Resemble the example program

Assignment Help Basic Computer Science
Reference no: EM131846325

Need help with this

Instructions:

Design and implement a class called bankAccountType according to the specified UML diagram.

bankAccountType

customerName: string

accountBalance: double

bankAccountType (string, double) deposit(double)

withdraw(double)

setName(string)

getName() const: string

getBalance() const: double

According to this UML diagram, the class bankAccountType will have two PRIVATE member variables: a string called customerName and a double called accountBalance.

The class will have a parameterized constructor and the following PUBLIC member functions:

  • bankAccountType constructor that will set customerName and accountBalance to the values
  • passed to the object at instantiation.
  • a void function called deposit that receives a double and adds that received value to the value of
  • accountBalance.
  • a void function called withdraw that receives a double and subtracts it from the value of
  • accountBalance. This function should not process a transaction that would result in a negative
  • account balance. Instead, this function should output a warning stating insufficient funds.
  • A void function called setName that receives a string and sets customerName.
  • A value returning function called getName that returns the customerName. This function should
  • be prevented from modifying the member variables.
  • A value returning function called getBalance that returns the accountBalance. This function
  • should be prevented from modifying the member variables.

Last, wrote test client to instantiate a bankAccountType object and test its public functions. Include the class definition, class implementation and test client in a single .cpp file. These requirements closely resemble the example program, so use the slides as a guide. Submit on Blackboard in the usual format

Reference no: EM131846325

Questions Cloud

Discuss the brainstorming session about the project : Have an initial brainstorming session about the project. Based on our preliminary discussions about the project in class, discuss your thoughts and ideas.
Discuss the programming syntax used in adding : Discuss the programming syntax used in adding decision making logic in a Visual Basic application. Review other learners' posts and provide recommendations
Developing a project plan for the access control system : Summarize the experience when developing a project plan for the access control system.
Identify a plc company that uses strategic management : Identify a PLC company that uses strategic management - this company may be prosperous, booming, in decline, or in economic difficulties.
Resemble the example program : These requirements closely resemble the example program, so use the slides as a guide. Submit on Blackboard in the usual format
What is the profile of the hacker : What type(s) of cybercrime was/were involved in this article? Does the identified offender fit the characteristics for this type of cybercrime?
How does that compare with the rest of the state : How does that compare with the rest of the state and Is there an area near where you live that are "Low income and low access" according to the USDA map
Discuss some of the performance issues : Discuss some of the performance issues when querying three or four tables at a time
What is the distance of shortest path for the traveler : CS1081 Homework Assignment. A traveler is departing from point A toward point B with a constraint: What is the distance of shortest path for the traveler

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Private specialized electronics company

UMUC is a small, private specialized electronics company in Kansas. For the past 20 years, it provided a wide range of precision electronic components and replacement parts for medical equipment used in hospitals, doctors office, and pharmacies. R..

  For each of the statements below

For each of the statements below (I, II and III), indicate whether the statement applies to a) a scalar processor, b) a superscalar processor or c) a multi-threaded processor.

  Create an object of class student

Create an object of class Student. You will notice that this time you are prompted not only for a name of the instance, but also for some other parameters. Fill them in before clicking OK. (Remember that parameters of type String must be written w..

  Program design and development

Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established..

  Required number of operands

If an operator is found, back up to get the required number of operands, evaluate the operator, and continue.

  Should this antivirus software be installed on mail server

What other actions should the Drib take to limit incoming computer worms and viruses in attachments? Specifically, what attributes should cause the Drib to flag attachments as suspicious, even when the antivirus software reports that the attachmen..

  Explain how to generate array of random numbers

For some general variables L and U, write a comment that explains how to generate a 1 x N array of random numbers whose values are between L and U.

  Explain the intrusion detection systems

Examine two advantages and two disadvantages of both the Intrusion Detection Systems (IDS) and Intrusion Prevent Systems (IPS). Explain which you would select if your organization could only have one or the other. Provide rationale for your respon..

  Calculate the expected net gain from buying cl

A used-car buyer can decide to carry out various tests with various costs and then, depending on the outcome of the tests, decide which car to buy.

  Create an alice method with a loop to make

Using the walk, move and turn methods, create an Alice method with a loop to make the character walk around in a complete circle. (You can approximate a circle with a polygon, such as an octagon.)

  Wap-prints a table of binary equivalents of decimal numbers

(Table of Decimal, Binary, Octal and Hexadecimal Equivalents) Write a program that prints a table of the binary, octal and hexadecimal equivalents.

  Create a function in vb and matlab fncdaysinmonth

define in VB: an array of months; in Matlab: a vector matrix of months, containing the number of days in each month.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd