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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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