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]
2 years ago
14

Write a C++ function for the following:

Computers and Technology
1 answer:
Nana76 [90]2 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
A ____ is a program that lets computer users create and access a collection of organized data.
ruslelena [56]
Database management system
5 0
3 years ago
Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
Bond [772]

Answer:

user_string = input("Input a string : ")

output = user_string.isnumeric()

if output == True:

   print("yes")

else:

   print("no")

Explanation:

  • First of all check whether user input have all numeric value or not .
  • Display yes if string contain all numeric values .
  • Display no if string contain at least one non - integer character .

7 0
3 years ago
Read 2 more answers
Are mobile phones hazardous to your health?
Digiron [165]

Explanation:

they can be. they can strain your eyes if you look at them too long with no breaks, for one thing

6 0
3 years ago
Read 2 more answers
It’s been six months since the disk crash at CSM Tech Publishing, and the owner is breathing a little easier because you install
Semmy [17]

Answer:

Storage Spaces

Explanation:

The feature that would best accommodate his needs would be the Storage Spaces feature that has been implemented in the Windows and Windows Server systems. This feature basically takes various hard drives and combines them together, this ultimately acts as copies of each other which protect the data of each one in the unfortunate case that one of the drives tends to fail. This feature also allows you to add more drives to the existing ones with very minimal effort without restricting configuration. Which would solve the needs that are needed in this scenario.

5 0
3 years ago
A disciplined, creative, and effective approach to problem solving is needed for project success. The nine-step approach to prob
KatRina [158]

Answer: Determine the most popular solution.

Explanation:

Some of the approaches to problem solving that are listed here include:

• Gather data and verify the most likely causes.

• Revise the project plan.

• Evaluate the alternative solutions

To solve a problem, one needs to gather the data and verify the likely causes of the problem. This can be done by asking questions, running test, interviewing people, running tests, reading reports, or analyzing data.

The project plan can also be revised. Likewise, when one comes with different solutions, one should weigh the cost and benefits of each in order to choose the best solution.

Determine the most popular solution isn't a correct option.

6 0
3 years ago
Other questions:
  • You will write a program that reads a binary file that contains records of creatures. Each record can be stored in a Creature st
    10·1 answer
  • Cyberterrorism is the use of terrorism to attack (Points : 1) public libraries. computer based networks. government spy networks
    15·1 answer
  • When possible, you should avoid using _________ variables in a program?
    11·1 answer
  • Most large organizations store data through a strategy called a(n) ________ to promote efficient and safe use of data across the
    11·1 answer
  • NEED THIS NOW PLEASE!!!! (I AM NOT JOKING I HAVE TO SUBMIT IN 5 MINUTES)
    13·2 answers
  • Which of the four control methods is best suited for transfer of large blocks of data?
    8·1 answer
  • What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
    6·2 answers
  • What is LINUX?
    6·2 answers
  • A user complains that the pointer movement on his laptop computer is very erratic what should you do?
    9·1 answer
  • After Daniel performed poorly on a test, his teacher advised him to do some self-reflection to figure out how he could get a bet
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!