Question

I started this with a windows form, however, based on the answer to this post yesterday, they started it out differently than I did, is it with a console app? In need of direction as the small detail can make a big difference.  

"

//--------- Annuity.cs ----------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
[Missing] Using System.Windows.Forms; **

namespace assignment
{
public class Annuity
{
private double annuityNumber;
private double depositAmount;
private double term;
private double currentBalanace;
private double interestRate;"

using System.Windows.Forms; namespace assignment 1 reference public partial class 1b1DepositAmt : Form public 1b1DepositAmt INew Annuity Cox Annuity Number: 1001 Deposit Amount: 100 Term: 1 Interest Rate: 5.5 Cancel Save #1001 FV: $1,230.72 Rate: 5.5Description: The objective of this assignment is to demonstrate the ability to create and use an object Requirements: ✓ Creat

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I don't know which post you are referring to so my answer will be based on the question described in the last image. You can definitely use forms as the question at no point bars you from doing so. Your code looks solid and you can go ahead with your last function calculateFutureValue. I will complete the code for you here

public double calculateFutureValue(double depositAmount, double term, double rate)

{

return depositAmount*((Math.Pow(1+rate),term)-1)/rate);

}

Just to reiterate, the question is testing your knowledge on objects i.e. creating and using them and not on the GUI aspect.

Hope this helps!

Add a comment
Know the answer?
Add Answer to:
I started this with a windows form, however, based on the answer to this post yesterday,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need to update the code listed below to meet the criteria listed on the bottom....

    I need to update the code listed below to meet the criteria listed on the bottom. I worked on it a little bit but I could still use some help/corrections! import java.util.Scanner; public class BankAccount { private int accountNo; private double balance; private String lastName; private String firstName; public BankAccount(String lname, String fname, int acctNo) { lastName = lname; firstName = fname; accountNo = acctNo; balance = 0.0; } public void deposit(int acctNo, double amount) { // This method is...

  • The current code I have is the following: package uml; public class uml {        public...

    The current code I have is the following: package uml; public class uml {        public static void main(String[] args) {              // TODO Auto-generated method stub        } } class Account { private String accountID; public Account(String accountID) { this.accountID = accountID; } public String getAccountID() { return accountID; } public void setAccountID(String accountID) { this.accountID = accountID; } @Override public String toString() { return "Account [accountID=" + accountID + "]"; } } class SuppliesAccount extends Account { private...

  • For this week's assignment , please create an application following directions in the attached document.(windows form...

    For this week's assignment , please create an application following directions in the attached document.(windows form application) Create a base class named Account and derived classes named SavingsAccount and CheckingAccount that inherit from class Account. Base class Account should include one private instance variable of type decimal to represent the account balance. The class should provide a constructor that receives an initial balance and uses it to initialize the instance variable with a public property. The property should validate the...

  • Look at the Account class below and write a main method in a different class to briefly experiment with some instances of the Account class.

    Look at the Account class below and write a main method in a different class to briefly experiment with some instances of the Account class.Using the Accountclass as a base class, write two derived classes called SavingsAccountand CurrentAccount.ASavingsAccountobject, in addition to the attributes of an Account object, should have an interest variable and a method which adds interest to the account. ACurrentAccount object, in addition to the instance variables of an Account object, should have an overdraft limit variable. Ensure...

  • Im having trouble with this C++ program. Lab 10/object/test files provided LAB 10 1 //Savings.cpp - displays the account balance at 2 //the end of 1 through 3 years 3 //Created/revised by <your nam...

    Im having trouble with this C++ program. Lab 10/object/test files provided LAB 10 1 //Savings.cpp - displays the account balance at 2 //the end of 1 through 3 years 3 //Created/revised by <your name> on <current date> 4 5 #include <iostream> 6 #include <iomanip> 7 #include <cmath> 8 using namespace std; 9 10 //function prototype 11 double getBalance(int amount, double rate, int y); 12 13 int main() 14 { 15 int deposit = 0; 16 double interestRate = 0.0; 17...

  • Create a BoxFigure class that inherits RectangleFigure class BoxFigure Class should contain:- Height instance field- Default...

    Create a BoxFigure class that inherits RectangleFigure class BoxFigure Class should contain:- Height instance field- Default constructor -- that calls the default super class constructor and sets the default height to 0- Overloaded constructor with three parameters (length, width and height) – that calls the two parameterized super class constructor passing in length and width passed and sets the height to passed height.- setDimension method with three parameters (length, width, height) – call the super class setDimension and pass in...

  • The following class StatCalc defines a series of methods for computing statistics for a group of...

    The following class StatCalc defines a series of methods for computing statistics for a group of numbers. /* * An object of class StatCalc can be used to compute several simple statistics * for a set of numbers. Numbers are entered into the dataset using * the enter(double) method. Methods are provided to return the following * statistics for the set of numbers that have been entered: The number * of items, the sum of the items, the average, and...

  • The following class StatCalc defines a series of methods for computing statistics for a group of...

    The following class StatCalc defines a series of methods for computing statistics for a group of numbers. /* * An object of class StatCalc can be used to compute several simple statistics * for a set of numbers. Numbers are entered into the dataset using * the enter(double) method. Methods are provided to return the following * statistics for the set of numbers that have been entered: The number * of items, the sum of the items, the average, and...

  • C++ Please create the class named BankAccount with the following properties below: // The BankAccount class...

    C++ Please create the class named BankAccount with the following properties below: // The BankAccount class sets up a clients account (name & ID), keeps track of a user's available balance. // It also keeps track of how many transactions (deposits and/or withdrawals) are made. public class BankAccount { Private String name private String id; private double balance; private int numTransactions; // Please define method definitions for Accessors and Mutator functions below Private member variables string getName(); // No set...

  • Write a Java class called BankAccount (Parts of the code is given below), which has two...

    Write a Java class called BankAccount (Parts of the code is given below), which has two fields name (String) and balance (double), two constructors and five methods getName(), getBalance(), deposit (double amount), withdraw(double amount) and toString(). The first constructor should initialize name to null and balance to 0. The second constructor initializes name and balance to the parameters passed. deposit method deposits the amount to the account causing the current balance to increase, withdraw method withdraws the amount causing the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT