Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

The ABC Bank authority now wants to create a database for their customers. So you are requested to modify your program of Assignment A3 as follows.

The main program first displays a menu to a user as follows in order to select an operation from the menu. 
=====================================
Welcome to ABC Back

Please choose an option from the followings.
<A>dd customers to the database
<S>earch the information for a given Customer ID (CID)
<Q>uit
=====================================

If the user chooses the option <A> then the program sets interest rate individually for all three accounts by reading a file, say "rates.txt" that contains interest rates as follows.

Saving(S)     Current (C)           Fixed Term (F)
=======    =========        ============
   0.08             0.05                       0.12


Note that the bonus interest of all customers will be calculated by using the same interest rates. It then asks the user to enter a 4-digit Customer ID (CID) for a customer in the same as it asked in Assignment A3. The program then passes the parameters (interest rates and CID) to a function called "CalculateBonusInterest()" in order to calculate bonus interest for the customer.

In the CalculateBonusInterest() function, the user needs to enter account information for the customer. But here the account information is a string. For example the string value "111" of the variable SCF indicates that a customer has all three accounts whereas "001" indicates that the customer has only Fixed term account. Note that a customer must have at least one account.

The user also needs to enter the balance of each account, that a customer has, in the function for the customer.

The function then calculates the bonus interest by using the interest rates, the account information and the rules mentioned in the table of the Assignment A2. It then stores the CID, account information, the balance of each individual account, the amount of interest of each individual account, the total interest earned from all accounts, bonus interest, and the total amount for all accounts into the customer database, say "Customer.txt".

A sample example of the "Customer.txt" file with two records is as follows.

CID       SCF  S.Bal.   C.Bal.   F.Bal.   S.Int.   C.Int.  F.Int.  Total Int.  Bonus Int.   Total Amount
====    ===   ====   =====  ====    ====  ====  ====   =====    =======    ==========
0001    111      1000     1000   1000        80     50       120     250           28.5           3278.5
0002    100      2000      -          -             160   -         -          160            15             2175.0


After storing account information, account balance and bonus interest of a customer, the program then prompts the user with the following message, "Do you want to calculate bonus interest for another customer (Y/N)? ". If the user enters "Y" then the whole process will be repeated for the new customer. Otherwise the program displays the menu to choose an operation.


Now if the user chooses the option <S> then the program first asks the user to enter a CID for finding information of a customer. Using the CID and the database "Customer.txt", it then displays the information of the customer.

For example, if the user enters a CID, say 0001, the program should display the following output.

CID    SCF     S.Bal.     C.Bal.    F.Bal.    S.Int.    C.Int.    F.Int.    Total Int.    Bonus Int.   Total Amount
====  ===     ====     =====   ====     ====    ====   ===      =====      ======      =========
0001   111     $1000     $1000     $1000     $80       $50     $120       $250         $28.5          $3278.5

After displaying the customer's account and balance information, the program then prompts the user with the following message, "Do you want to search information for another customer (Y/N)? ". If the user enters "Y" then the program asks the user to enter CID for the next customer. Otherwise the program displays the menu to choose an operation.

Finally, the program quits if the user chooses the option <Q>.

Use multiple functions, instead of using only one function to do everything. Make a good design of the functions to make the best use of the code and avoid duplicate calculations. You also need to design your program so that it has components that can be reused in another program, if needed.


Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified.

Implement your program in Python.

Comment your code as necessary to explain it clearly.

Use 1 set of test data that will demonstrate the correct normal operation of your program.

Run your program using the test data you have selected and save the output it produces in a text file.

Submit:
          1. Your algorithm.
          2. The table recording your chosen test data.
          3. Source code for your Python implementation.
          4. Output listings demonstrating the results of using the test data.

It is important that the output listings are not edited in any way.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M9579916

Have any Question?


Related Questions in DBMS

This assignment is a continuation of this solution the case

This assignment is a continuation of this solution The case study company has received the first report from its enterprise content management (ECM) consultant and now has a documented list of major content requirements ...

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

Analytic reportpurpose the purpose of this task is to

Analytic Report: Purpose: The purpose of this task is to provide students with practical experience in working in teams to write a Data Analytical report to provide useful insights, pattern and trends in the chosen/given ...

Sqlwrite a select statement that returns one column from

SQL Write a SELECT statement that returns one column from the Vendor table named Full Name. Create this column from the VendorContactFName and VendorContactLName columns. Format it as follows: last name, comma, first nam ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

Sql transactions exercisesconsider table itemnameprice

SQL Transactions Exercises Consider table Item(name,price) where name is a key, and the following two concurrent transactions. T1: Begin Transaction; Update Item Set price = 2*price Where name = 'pencil'; Insert Into Ite ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

The case study company received a detailed report from the

The case study company received a detailed report from the ECM consultant with a detailed list of data requirements, tools, and processes that are currently used to manage this data. The chief executive officer (CEO) and ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

  • 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