Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 150 Marks Write a complete C++ program, to determine whether or not a person is eligible for conversion of the education loan to a
Question 150 Marks Write a complete C++ program, to determine whether or not a person is eligible for conversion of the education loan to a scholarship and the discount on the education loan repayment. The program should be able to do the following tasks: Task 1: Write a "getData" function. (9 marks) a) This is a function that does not return any values. b) It accepts as input parameters the identity card (IC) number, Cumulative Point Average (CPA), type of employment sector, eligibility status. c) The function should prompt the user to enter their IC number, Cumulative Point Average (CPA), type of employment sector if they are NOT cligible. A person is eligible for conversion to a scholarship if their CPA is 3.75 or greater. d) The function returns to the calling module all of the values entered by the user in (C), as well as the eligibility status using reference parameters. Task 2: Write a "getDiscount" function. (18 marks) a) It accepts as input parameters the Cumulative Point Average (CPA) and type of employment sector b) The function should determine the discount on the education loan repayment received by those who are NOT eligible for scholarship conversion based on the criteria listed in Table 1. c) It should return the value determined in (b). Table 1 Type of employment sector 2. Private 3. Self-employment 1. Government Cumulative Point Average (CPA) 3.00 to 3.74 2.99 and below 70% 30% 0% 50% 25% 50% Task 3: Write a main function. (18 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press 'Y' or 'y". b) You are NOT ALLOWED to use arrays except an array of characters. c) The function may need to call the functions defined in Task 1 and Task 2. d) The program should generate the output shown in the sample execution below. The values in bold are those entered by the user. Task 4: You must ensure that your program meets the following criteria: (5 marks) a) The program can be executed. b) The program employs an appropriate structure for the program (eg. all required header files are included, the program is properly written, proper indentation, etc.) SAMPLE PROGRAM EXECUTION > IC number: 720322015617 Cumulative Point Average (CPA): 3.85 Conversion Status: ELIGIBLE Press 'Y' to enter other data: Y > IC number: 860723045608 Cumulative Point Average (CPA): 3.65 Type of Employment sector: 1-Government, 2-Private, 3-Self employment Enter your employment sector: 1 Conversion Status: NOT ELIGIBLE Discount on the loan repayment: 70% Press 'Y' to enter other data: Y > IC number: 830918055071 Cumulative Point Average (CPA): 2.5 Type of Employment sector: 1-Government, 2-Private, 3-Self employment Enter your employment sector: 4 Enter your employment sector: 3 Conversion Status: NOT ELIGIBLE Discount on the loan repayment: 256 Press 'Y' to enter other data: Y > Cumulative Point Average (CPA): 3.0 Type of Employment sector: 1-Government,2-Private, 3-Self employment Enter your employment sector: 0 Enter your employment sector: 2 Conversion Status: NOT ELIGIBLE Discount on the loan repayment: 30% Press 'Y' to enter other data: N
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started