Hi

I'am a new user here and I really need this to be done.

I hope from the experts help me as soon as possible.

This is the Code and you will see the requirements Below it.


----------------
Display 10.1
----------------

Code:
#include <iostream> 
using namespace std:

struct CDAcount
{
	
	double balance;
	double interest_rate;		
	int term;

};

	void get_data(CDAcount& the_acount);
	
	int main()
	{
		CDAcount acount;
		get_data(acount);
		
		double rate_fraction, interest;
		rate_fraction = acount.interest_rate / 100.0;
		interest = acount.balance*rate_fraction*(acount.term/12.0);
		acount.balance = acount.balance + interest;
		
		cout.set(ios::fixed);
		cout.setf(ios::showpoint);
		cout.precision(2);
		
		cout << "When your CD matures in "
			 << acount.term << "monthes, \n"
			 << "it will have a palance of $"
			 << count.palance << endl;
			 
		return 0;
	}
	


	void get_data(CDAcount& the_acount)
	{
		cout << "Enter acount balance: $";
		cin >> the_acount.balance;
		
		cout << "Enter acount interest rate: ";
		cin >> the_acount.interest_rate;
		
		cout << "Enter the number of months until maturity \n"
			 << "(must be 12 or fewer monthes): ";
		cin >> the_count.term;
		
	}



Q: Redefine CDAcount from Display 10.1 so that it is a class rather than a structure. Use the same member variables as in Display 10.1 but make them private. Include member functions for each of the following: one to return the initials balance, one to return the balance at maturuity, one to return the interest rate, and one to return the term. Include a constructor that sets all of the member variables to any specified values, as well as a default constructor. Also, include an input member function with one formal parameter of type istream and an output member function with one formal parameter of type ostream. Embed your class definition in a test program.


Thanks to every 1 for your efforts

Your new Brother / SonY