logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
StatAnalytica ExpertFinance
(5/5)

899 Answers

Hire Me
expert
David AvitiaManagement
(5/5)

516 Answers

Hire Me
expert
Frederick ManhireMarketing
(5/5)

773 Answers

Hire Me
expert
Noormehal MohamaadFinance
(5/5)

647 Answers

Hire Me
C++ Programming

Write a program using the object-oriented paradigm that keeps track of bank accounts. Each class should have constructor and destructor methods but the choice of members will be up to you.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Part 1-2 marks

Q1) Write a program using the object-oriented paradigm that keeps track of bank accounts. Each class should have constructor and destructor methods but the choice of members will be up to you. Start with a class for ‘account’ and then allow for different types of derived classes, such as ‘savings account’ and ‘credit card account.’ A bank account should allow funds to be added to it as well as withdrawn but not to be overdrawn. A credit card account should allow funds to be charged to it but not more than its limit. In the main() function, open a savings account with $10,000 and then make three withdrawals of $4,000, if there are enough funds. Open a credit card account, with a limit of $3000 and make two charges of $2000 if there are enough funds. If you breach the conditions for each, display an appropriate error message.

Q2) Write a program using functions with parameters and return value with following requirements.

Ask the user to enter two numbers(If you want to add extra functionality you can provide validations.)

 Ask the user to enter a choice.

If the user enters + then the function to add the numbers should be called and the numbers should be added.

If the user enters - then the function to subtract the numbers should be called and the numbers should be subtracted.

If the user enters * then the function to multiply the numbers should be called and the numbers should be multiplied.

If the user enters / then the function to divide the numbers should be called and the numbers should be divided(quotient will be calculated).

 

Q3)Taking the (in-module-example of the car, create a new Bike Class and include one or more additional variables for the speed of the bike. Include mutator and accessor methods for the bike’s speed and use them in the start(), accelerate(), brake() and stop() methods to extend their functionality. When the bike starts, initialise its speed to 0. Allow the accelerator method to increase the speed by an increment and the brake method to decrement the speed. Print the current speed to the screen
Race time:take the same example and separate the class into a header file. Write another program that instantiates two bike objects,both of different models (if you don’t know bikes, look up examples for brands of bikes). In your code, start each bike and then accelerate each bike at different rates. Do this in a loop for each bike and then reverse the rates for braking till one bike comes to a complete stop. Print the name of the bike that comes to a complete stop first and declare the other bike the winner.

 

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme