Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ABC Financing company is providing credit card services to all the customers who fulfilled the requirement that is a minimum monthly salary of RM5000 and

ABC Financing company is providing credit card services to all the customers who fulfilled the requirement that is a minimum monthly salary of RM5000 and which has one financing loan which the amount of payment is less than or equal 25% from the monthly salary. The customer's data is stored in the input file that's shown in Figure 1. For the eligible customers, there are three types of cards offered; Platinum, Gold, and Silver. Table 1 shows the minimum requirement and total credit that is allowed for each card.

851205-07-6734 Afrina 17000 1 2000

851207-02-7762 Ali 40000 1 10000

801112-02-3421 Syakila 4000 1 1000

:

Figure 1 : Contain of input file

Table 1: Requirement for credit card application

Type of Card

Requirement: Minimum Monthly Salary

Credit Limit

Platinum(P)

RM 40,000

RM25,000

Gold (G)

RM 15,000

RM10,000

Silver(S)

RM 5,000

RM 3,000

  1. Write a function to read data from the input file and store that information in the arrays. List of arrays are as shown below.
  1. Array to store IC number
  2. Array to store nickname of the customer
  3. Array to store monthly salary
  4. Array to store number of loan
  5. Array to store monthly loan payment

eg: contain of arrays

IC number

851205-07-6734

851207-02-7762

801112-02-3421

Customer nickname

Afrina

Ali

Syakila

Monthly salary

17000

40000

4000

Number of loan

1

1

1

Monthly loan payment

2000

10000

1000

  1. Write a function to determine the eligibility of each customer and store their eligibility in an array.

  1. Write a function to display a menu as shown in Figure 2 and allow a user to choose from the menu. A user may repeat this process more than once. An example of the display is shown below:

ABC Financing Company

MENU

  1. Display of PLATINUM card Holder
  2. Display of GOLD card Holder
  3. Display of SILVER card Holder
  4. EXIT

Please enter your choice :

Continue [Y/N] :

Figure 2 : Menu

Note: you may use switch statement or if else if statement to create a menu

The menu works as bellow:

  1. If the user choose 1 from the menu, then name list of Platinum card holder will be displayed. An example of display is shown below.

Nickname IC Number Balance from salary

Ali 851207-02-7762 RM30000

:

  1. If the user choose 2 from menu, then name list of Golden card holder will be displayed.
  2. If the user choose 3 from menu, then name list of Silver card holder will be displayed.
  3. If the user choose 4 from menu, the program will exit from this function.

  1. Write a function to store information in a file as shown in Figure 3 before end the execution of the program. (Note: N represents not eligible)

851205-07-6734 G

851207-02-7762 P

801112-02-3421 N

:

Figure 3 : Contain of output file

  1. Finally call all the above functions from function main( ).

  1. Complete C++ Program listing with comments.
  2. Input and output file.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions