subject

Create an account class. an account object has these properties: int acctnumber: the account number string name: the account holder’s name double balance: the current balance in the account implement these methods: public account(int acct_number, string name, double balance) the constructor public string tostring() returns a string giving the account id, name, and balance, separated by colons. do not use format() on the balance; you want to keep the number as accurate as possible. public void deposit(double amount) adds the given amount to the current balance. if the amount is negative, the balance must not be changed; otherwise, the balance property is updated to reflect the deposit. public void withdraw(double amount) withdraws the given amount from the current balance. if the amount is negative or greater than the current balance, the balance must not be changed; otherwise, the balance is updated to reflect the withdrawal.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
You know the right answer?
Create an account class. an account object has these properties: int acctnumber: the account numbe...
Questions
Questions on the website: 13722360