Question: A system (to be developed as a program written in C++ and using the command line for output) is required that allows the user to

A system (to be developed as a program written in C++ and using the command line for output) is required that allows the user to create and edit a list containing a number of initially unordered Banking Transaction objects. The Banking Transaction objects represent withdrawals by debit card, cashpoint machine, direct debit, and deposits by transfer, creditpoint machine and interest payment. The Banking Transaction objects will be entered by the user and stored in a linked list (consisting of a List class and a Link class, adapted from those used in lecture 8 and lab 8, or lecture 11 and lab 11). The Banking Transaction objects will have a Transaction superclass that has the subclasses: Debit, Cashpoint, DirectDebit, Transfer, Creditpoint and Interest. Transaction will be an abstract class and its subclasses will be concrete classes. All Transaction subclasses will have a name, date and amount (in pounds and pence). In addition: Class Debit will have attributes to store the card number used, retailer name, retailer location, authorisation method (online, phone, mail order). Class Cashpoint will have attributes to store the location id of the cashpoint machine, and the card used. Class DirectDebit will have an attribute to store a reference. Class Transfer will have attributes to store the account number and bank sort code from where the transfer originated. Class Creditpoint will have an attribute to store the type of payment (cheque or cash). Class Interest will have an attribute to store the type of interest (daily, monthly or annual). The user will be able to set the attributes of the Banking Transaction objects only when they are created and not after addition to the link list. An identifier for the object sub-class should not need to be stored. The user interface will be a menu having the following options: Q - Quit: The program should end without saving the Banking Transaction objects. I - Insert an object: The user should be prompted to enter a Banking Transaction object type and its attributes, and place the Banking Transaction object at the top (start) of the linked list. D - Delete an object: The user should be prompted to delete the Banking Transaction object from the top of the linked list. C - Contents of the display: Display a list of all the Banking Transaction objects, their type and their attributes. S - Save to file: Ask the user for a filename and append (add to the end of the file) all the Banking Transaction objects, from the linked list, and their attributes in that file in a suitable text format. L - Load from file: Ask the user for a filename and load the Banking Transaction objects and their attributes from that file into the programs linked list. The Banking Transaction objects are added to those already in the programs linked list. N Linear Search: Perform a linear search through the link list to find a Banking Transaction object by date and display its attribute values. The linear search algorithm used should be from the lectures. B Binary Search: Perform a linear search through the link list to find a Banking Transaction object by date and display its attribute values. The binary search algorithm used should be from the lectures. T Sort: Sort the Linked List so that the date attribute of each Banking Transaction object is decreasing from the top of the link list. The sort algorithm used should be from the lectures. After completion of each choice, other than Quit, the system waits for the user to press a key to return to the menu again. The time taken to do the linear search, binary search and sort functions should be displayed when each function has been completed. The time must be calculated using the clock timer from the lectures. An interface will be required to perform the functionality above. Clarity, performance and simplicity should be considered in the interface design.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!