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
When cleaning a computer, you need only worry about what you can see.
icang [17]

Answer:

No

Explanation:

Somethimg yu cant see are important

5 0
3 years ago
HELP!' Prompt<br> In a table, what is a field?
ser-zykov [4K]

Answer:

Fields are the components that provide structure for a table. In fact, you can't have a table without fields. ... Fields in a table store the same category of data in the same data type. For example, if you have a NAME field in a table of customers, the entries for this field are all customer names and are stored as text.

3 0
3 years ago
Kurt is editing a table in his powerpoint that displays accounting formulas and when to use them. he wants to remove the table s
Olenka [21]
The feature that Kurt should use is the split feature. 
7 0
3 years ago
Why do you need to cite your sources? (check all that apply)
Shalnov [3]

the answer to this is  2 and 3

Hope this helped

-scav

4 0
3 years ago
What is the key function of a Scrum Master?
Reptile [31]

Answer:

The scrum master is the team role responsible for ensuring the team lives agile values and principles and follows the processes and practices that the team agreed they would use. The responsibilities of this role include: Clearing obstacles. Establishing an environment where the team can be effective.

Explanation:

8 0
4 years ago
Other questions:
  • A database on a mobile device containing bands, sub-bands and service provider IDs allowing the device to establish connection w
    9·1 answer
  • 7. Write a program in C to display the string "ARRAY" in the following format : A AR ARR ARRA ARRAY
    5·1 answer
  • In what order are ribbons organized? From Microsoft Word
    7·1 answer
  • You knew that you had to take this quiz so you logged into Blackboard and went to the quizzes section. In this scenario your com
    11·1 answer
  • Students who interact online with others from different cultures should remember that
    5·2 answers
  • g 18.6 [Contest 6 - 07/10] Reverse an array Reversing an array is a common task. One approach copies to a second array in revers
    8·1 answer
  • You have been asked to create a query that will join the Production.Products table with the Production.Categories table. From th
    6·1 answer
  • 54 points!!! Cyber security
    14·1 answer
  • Write the definition of a void function that takes as input two integer values, say n and m. The function returns the sum and av
    9·1 answer
  • Which of the following does NOT describe the characteristics of cyberbullying?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!