1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
klio [65]
3 years ago
14

Write a C++ function for the following:

Computers and Technology
1 answer:
Nana76 [90]3 years ago
4 0

Solution :

class Account

$ \{ $

public:

$\text{Account}()$;

double $\text{getBalance}$();

void $\text{setBalance}$();

$\text{bool withdraw}$(double bal);

$\text{private}:$

double $\text{balance}$;

}:

$\text{Account}()$ {}

double $\text{getBalance}$()

$ \{ $

$\text{return balance}$;

}

void $\text{setBalance}$(double $\text{balance}$)

$ \{ $

this.$\text{balance}$ = $\text{balance}$;

}

$\text{boolean}$ withdraw($\text{double bal}$)

$ \{ $

if($\text{balance}$ >= bal)

$ \{ $

$\text{balance}$ = $\text{balance}$ - bal;

$\text{return}$ true;

}

$\text{return}$ false;

}

}

You might be interested in
So im new how exactly does this point system work???​
lapo4ka [179]

Answer:

Ok so basicly every time you see a question and you can answer it you press on the answer bar you type in your answers then you will automaticly get points depending on the question you answer, you need to get more than 5+ to ask a question  of your own

Explanation:

5 0
3 years ago
Do network packets take the shortest route?
Sergio039 [100]

Answer:

The packet will take a shorter path through networks 2 and 4

5 0
2 years ago
Read 2 more answers
Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne
trasher [3.6K]

Answer:

printStars(35);

Explanation:

public class Question {

   public static void main(String args[]) {

     printStars(35);

   }

   public static void printStars(int numberOfStars){

       for(int i = 1; i <= numberOfStars; i++){

           System.out.print("*");

       }

       System.out.print("\n");

   }

}

7 0
3 years ago
In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key r
lesya692 [45]

Answer:

True

Explanation:

In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key requirements includes certification and accreditation, which is a process that occurs after the system is documented, controls tested, and risk assessment completed. It is required before going live with a major system. Once a system is certified and accredited, responsibility shifts to the owner to operate the system is a true statement.

8 0
3 years ago
How can random numbers in a range be generated in Java?.
Ksju [112]

Answer:

Java oh Na Na my  

Explanation:

5 0
2 years ago
Other questions:
  • What is the differnces between dark and middle ages of computer?​
    9·1 answer
  • The set of appearance choices for files and folders is known as the
    7·1 answer
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    8·1 answer
  • 1. Write a program to prompt the user to enter a single character and respond back whether or not the character is valid dna. 2.
    12·1 answer
  • For which task is the WordArt gallery most useful?
    15·2 answers
  • Fair Use means a teacher can take the contents of a web activity page and repost it in your school's web site because it is for
    7·1 answer
  • Using pointers and shared memory for IPC, what would you need to add to your code to ensure data integrity?
    15·1 answer
  • What is it called when servers on the Internet supply applications as a service, rather than a product
    14·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • Here’s my last question
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!