Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Programming Project

Overview Using Classes

Implementation

Implement a simple automated bank registry system. The implementation will include several attributes related to a transaction, and the data will be managed in a global linked list within memory. The program must use the "list" API in the C++ standard template library. All of the attributes associated with each transaction will be stored as a single object within a global linked list data structure. The program must implement at least one class that will hold the following variables: transId - An integer for the transaction ID that consists of a number starting at 1000 for the first transaction in the linked list and automatically incremented by 1 for each subsequent transaction entered into the linked list. The user will not enter this number. date - A string for the date of the transaction. The date must be in the form mm/dd/yyyy. The program must re-prompt the user to reenter the date if it is not a valid form.

Description - A string variable to indicate the description of the transaction (spaces between words must be allowed).

Payment - A double variable to indicate a transaction payment or deduction from the account. A value of 0 if the transaction is not a payment.

Deposit - A double variable to indicate a transaction deposit or addition to the account. A value of 0 if the transaction is not a deposit.

Provide the appropriate accessor methods to set and get the data for each of these class variables.

For example setDate(string date) and getDate(). In addition, the main program must provide the following functionality:

1. When the program is first started, it must read a data file called registry.dat. The program should not prompt the user for the name of the data file. If the file exists, the program will load the data for each transaction into the global linked list data structure.

If the file does not exist, the program will start with an empty linked list.

2. The program should provide a simple text-based user interface similar to the Book Inventory example that manages the all of the transactions within the global linked list.

Each transaction must be placed in this global linked list as an object that holds all of the information associated with the given transaction. The user interface will allow the user to do the following:

(a) Display Registry - displays all of the transactions in the global linked list. This feature will display all of the fields associated with the each transaction. In addition it must also print the total number of transactions, the total amount in payments, the total amount deposits, and the total balance, which can be calculated as follows:

(b) Enter Transaction - allows the user to enter all of the fields associated with a given transaction, except for the transId, which will be automatically generated by the program as previously mentioned. After the data fields are entered, the program will place the transaction entry in the global linked list data structure that is kept in memory. Note: a deposit transaction will have a 0 Troy University eCampus, CS 3330 Data Structures and Algorithms. amount for payment value, and a payment transaction will have a 0 amount for a deposit value.

(c) Delete Transaction - allows the user to delete a transaction from the linked list using the transId as the key. The program will display a message if the transaction is not found in the linked list.

(d) Search for Transaction - allows the user to find a transaction. The program will prompt the user to enter the transId and will display a message if there are no matching transaction in the global linked list.

(e) Edit Transaction - allows the user to edit all of the fields for a given transaction (except for the transId) in the linked list. The program must use the transId as the key to find the entry to edit. For simplicity, the program may re-prompt the user to re-enter all of the fields associated with the given transaction; but it again must reuse the transId values. Display a message if the transaction is not found in the linked list.

(f) Exit system - before the program exits, it must save all of the data in the global linked list to the data file. I recommend using a standard text file with one field per line. At this point, if the file does not exist, the program will create it.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92053721
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Develop a hypothesis that could explain why a soap created

Develop a hypothesis that could explain why a soap created from the acid CH 3 CH 2 CH 2 CH 2 COOH has poorer cleaning properties than soap made from palmitic acid. Develop a hypothesis that could explain why a soap creat ...

Why hasnt health care in australia been entirely privatised

Why hasn't health care in Australia been entirely privatised, according to Boxall and Gillespie? Should health care (in Australia) be wholly privatised? Do you think it will be in the future?

Suppose that a weapons inspector must inspect each of 4

Suppose that a weapons inspector must inspect each of 4 different sites 2 times, visiting one site per day. The inspector is free to select the order in which to visit these sites, but cannot visit site X, the most suspi ...

The richter scale is often used to measure the strength and

The Richter scale is often used to measure the strength and potential damage caused by an earthquake. Design and write an algorithm which accepts as input a Richter scale reading and then prints a message indicating the ...

Research parallel computing and prepare an informal paper 2

Research parallel computing and prepare an informal paper 2 -3 pages in length, single spaced with a blank line beltween paragraphs. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

Question the below table shows the instruction count ic for

Question : The below table shows the instruction count (IC) for programs running on three processors P1, P2, and P3 with the clock rates 1.0 GHz, 2.5 GHZ, and 2.0 GHz respectively. Each program consists of only Load/stor ...

Requirementsthis week you will write single page web

Requirements This week you will write single page web application that will receive incoming POST and GET requests. If it is a POST request it should say at the top of the page, in an H1 tag "POST Request Received". If a ...

When talking about economics and the history of it for the

When talking about Economics and the history of it. For the past recessions the U.S. has had, do we look at it mostly on the loan side of the banks or what causes most recessions?

Solutions may require mathematical proofs tracing of

Solutions may require mathematical proofs, tracing of algorithms (displaying the calculations and values of variables for each iteration of the algorithm), algorithm design, and writing programs. The following submission ...

Lets do some r suppose you have the following situation you

Let's do some R.... Suppose you have the following situation: You have a large jar of beans, 43% black, 57% white. You take a sample of 14 beans. a) Use R to figure out the probability for every single possible outcome. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As