Implement class bankacct for bank of usq using bankacctcpp

Assignment Help C/C++ Programming
Reference no: EM13380378

Implement class BankAcct, for Bank of USQ, using bankacct.cpp and bankacct.h:

- The BSB for Bank of USQ at Towoomba is 324-001.

- A BankAcct object will have a 3 digit bank account number larger than 100 which is a serial number generated by a Serial object. E.g. 324-001-101, 324-001-102, 324-001-103 are the first three possible bank account number for Bank of USQ.

- A BankAcct object will have a bank account pin code which is a 4 digit random number generated by a RandomInt object.

- Class BankAcct should provide a member function to screen display the bank BSB plus account number and the pin code.

Implement an application bankUSQ_app.cpp:

- It will read bankUSQ_account.txt and print out all accounts and pins from the file.

- It will ask user input for the number of bank accounts to generate, and the starting account number.

- Uses class Serial and class RandomInt to generate the account number and the pin code.

- Create BankAcct objects to hold the account number and pin code.

- The BSB (324-001) can be hard coded for screen display only. You do not need to write BSB as part of the account number in bankUSQ_account.txt.

- All generated bank accounts will be store in a vector.

- Before the application exits, it will append the generated accounts to an existing text file named bankUSQ_account.txt. You will need to create an empty bankUSQ_account.txt

before you run the application for the first time.

- Repeat the above steps until the number of bank accounts to generate is 0.

- Assume that all bank accounts generated in each call of the application are unique and not overlapping.

Use Exception to check

- The number of accounts to be created is less than 10. (Assume no negative integers entered.)

- If the input is not valid, the program will ask for user input again.

- You have to use BankError class which is derived from logic_error for exception handling.

- Implement BankError in bankUSQ_app.cpp.

Submit bankacct.cpp, bankacct.h, and bankUSQ_app.cpp and task3.txt. RandomInt class and Serial class files are the same as in Task 1 and 2.
/* Expected output

// bankUSQ_account.txt is empty
Account number: 324-001-1975521678
Pin Code: 0

// 13 is too many, ask for input again
Enter the number of bank account ( < 10), 0 to quit:
13
Too many accounts requested. You requested 13 account numbers. Enter
the number
of bank account ( < 10), 0 to quit:

// 2 is OK
Enter the number of bank account ( < 10), 0 to quit:
2
Enter the start value of account number:
111
Account number: 324-001-111
Pin Code: 8327

Account number: 324-001-112
Pin Code: 3620

// another 2
Enter the number of bank account ( < 10), 0 to quit:
2
Enter the start value of account number:
222
Account number: 324-001-222
Pin Code: 8350

Account number: 324-001-223
Pin Code: 7554

Enter the number of bank account ( < 10), 0 to quit:
0
Quit ...

c\>a

// There are 4 accounts in bankUSQ_account.txt
Account number: 324-001-111
Pin Code: 8327

Account number: 324-001-112
Pin Code: 3620

Account number: 324-001-222
Pin Code: 8350

Account number: 324-001-223
Pin Code: 7554

// too many
Enter the number of bank account ( < 10), 0 to quit:
45
Too many accounts requested. You requested 45 account numbers. Enter
the number


of bank account ( < 10), 0 to quit:

// 3 is OK
Enter the number of bank account ( < 10), 0 to quit:
3
Enter the start value of account number:
333
Account number: 324-001-333
Pin Code: 8435

Account number: 324-001-334
Pin Code: 6869

Account number: 324-001-335
Pin Code: 5797

Enter the number of bank account ( < 10), 0 to quit:
0
Quit ...
// there are 7 accounts in bankUSQ_account.txt now
*/
/* bankUSQ_account.txt
111
8327

112
3620

222
8350

223
7554

333
8435

334
6869

335
5797
*/

Reference no: EM13380378

Questions Cloud

Learning outcomes assesseda describe and discuss the : learning outcomes assesseda describe and discuss the issues involved in managing software selection. b compare
A simple database with a single table contains data : a simple database with a single table contains data concerning rental properties in australia. the table contains five
The development of complex algorithms that can mine mounds : the development of complex algorithms that can mine mounds of data that have been collected from people and digital
Select one of the social media tools noted above and : select one of the social media tools noted above and explain how this application can be used to collect data from
Implement class bankacct for bank of usq using bankacctcpp : implement class bankacct for bank of usq using bankacct.cpp and bankacct.h- the bsb for bank of usq at towoomba is
Taskimplement class serial using serialcpp and serialh- the : taskimplement class serial using serial.cpp and serial.h- the function call operator is overloaded and will generate a
Taskimplement class randomint using randomintcpp and : taskimplement class randomint using randomint.cpp and randomint.h.for the randomint class- the function call operator
The impact of a catastrophic failure can be the difference : the impact of a catastrophic failure can be the difference between making and breaking an organization. many government
Create a graphical calculator with buttons that can add : create a graphical calculator with buttons that can add subtract multiply divide - sin cos tan clear and modulus.write

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a script that creates a craps game

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.

  The use of decision logic

The use of decision logic is one of the major concepts of computer programming.

  What is printed by the following program

What is printed by the following program?

  Define a class named payment that contains an instance

Define a class named Payment that contains an instance variable of type double that stores the amount of the payment and appropriate accessor and mutator methods.

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  The fibonacci sequence

In the novel "The DaVinci Code", a scrambled version 13, 3, 2, 21, 1, 1, 8, 5 of the first eight Fibonacci numbers appear as one of the clues left by murdered museum curator Jacques Sauniere. In this assignment, we will do something related to t..

  Display the list of all car record

Sales and Profits - show car model, the number of car in stock, car sold, unit cost, selling price and the profit for each car and the total profit for all cars.

  Create a program that outputs the result of the formula

Create a program that uses the same formula above to output the result; this time, however, prompt the user for the values a, b, x, and y. Use appropriate variable names and naming conventions.

  Write a c program to compute dr if f1=50 lb and f2 = 4000

make a program for:A hydraulic lift as shown below from fluid mechanics, it can be shown that a small force F1     acting over a piston of diameter D 1    can be multiplied into a large force   F 2    acting over a piston of diameter D 2  .

  Brownian motion is a physical phenomenon

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.

  Design customized mailing lists for marketing department

Marketing department requires to be able to design customized mailing lists, to send different messages to different types of donors. What system will best meet these requirements?

  You are to add mean, standard deviation

You are to add mean, standard deviation, and insert in order functionality to your statistics list program. Insert in order means that you will add a function called find_index that will locate the place in the array that a new value should be ins..

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