0% found this document useful (0 votes)
69 views8 pages

Cmpg122. Exam 1st Opp

This document describes requirements for an application to help people apply for vehicle and property loans. It involves 3 forms: 1. Authentication form to validate a secret key for one of 4 users. 2. Main application form to collect applicant details and calculate maximum affordable repayments. It calls methods to adjust amounts for fees and ensure savings remain. 3. Output form to display recommendations and save a summary to a text file. It generates a reference number and calculates total/remaining funds. The application needs to validate input, move between controls using keyboard, dynamically adjust repayment amounts, save to file without dialogs, and handle exceptions. It aims to prevent overcommitting funds and loan defaults.

Uploaded by

otheliamkhatshwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views8 pages

Cmpg122. Exam 1st Opp

This document describes requirements for an application to help people apply for vehicle and property loans. It involves 3 forms: 1. Authentication form to validate a secret key for one of 4 users. 2. Main application form to collect applicant details and calculate maximum affordable repayments. It calls methods to adjust amounts for fees and ensure savings remain. 3. Output form to display recommendations and save a summary to a text file. It generates a reference number and calculates total/remaining funds. The application needs to validate input, move between controls using keyboard, dynamically adjust repayment amounts, save to file without dialogs, and handle exceptions. It aims to prevent overcommitting funds and loan defaults.

Uploaded by

otheliamkhatshwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Type of assessment/ 1st Opportunity Examination Qualification/ BSc /

Tipe assessering: (Practical Question) Kwalifikasie:


Module code/ CMPG122 Duration/ 3 hours
Modulekode: Tydsduur: (inc. zip /
submission
time etc.)
Module description/ User Interface Programming Max/ 100
Modulebeskrywing: Maks:
Examiner(s)/ Mr D Keykaan Date/ 20/11/2023
Eksaminator(e): Dr T Mapayi Datum:
Internal/Interne Dr. S van der Linde Time/ 12:00
moderator(s): Tyd:

PART 1

Most south Africans cannot afford to purchase assets such as a house or car in cash, as a once off
payment. Due to this, many of them apply for bank loans to purchase either one or both assets. When
a person purchases a house or car by means of a loan, the bank only allows you to keep it in your
possession, on the condi�on that you will repay them every month for a certain number of years.
Unfortunately, life has unexpected expenses and people cannot always pay the amount of money they
commited to repaying the bank or financial ins�tu�on. As a result, the bank o�en repossess these
assets and the people lost all the payments already made and the asset(s).

In South Africa, banks repossess more than 5000 houses and cars every month and this kind of loss
can lead to customer depression, suicide and other personal challenges. Following this alarming
number of repossessions, the department of social development has partnered with your IT company
“Tswelopele Solu�ons” to create an applica�on that will address this socio-economic issue.

NOTE:

Remember to use the correct data types for all your data /values.
Create a Windows Forms Applica�on (.NET Framework) to do the following:

Carefully study the GUI in Fig 1 and design one, exactly the same:

(No addi�onal control from the toolbox may be used to display this picture)

Fig 1: Form 1

The purpose of this applica�on is to grant access to only 4 predetermined users who will collect
personal financial informa�on from a poten�al bank finance applicant. The applica�on then calculates
and recommends a maximum amount for vehicle and property monthly repayments based on their
current income, current assets and expenses etc. The applica�on must then display a receipt with
relevant informa�on and a system generated reference number. If the system user wants to save a
summary of the informa�on (not the content from the displayed printout listbox) directly to a file, it
should be possible through the click of a buton.

Form 1

Use the C# method that compares one string with another string and returns only one of 3 possible
whole numbers which each indicate whether one string is greater, less than or equal to the other.
When the user provides a key, and clicks the “Authen�cate buton”, the applica�on must check
whether the provided secret key is an exact match with any one of the 4 that may be used to access
the system.

This applica�on may only be used by 4 staff members using the secret keys below:

- “55234”
- “45237”
- “67154”
- “95241”

Once either one of the 4 secret codes are matched, the second form must load, otherwise display an
appropriate message to show that the code is not correct. The second form must look exactly like Fig
2 below:

Fig 2: Form 2

The class of form 2 must contain a method with a method name " RealNet " and the method should
be called from any other class. When it is called, it must receive a monetary value as argument, but
not just a copy of the value should be passed. What ever change is applied to the argument must
become a permanent change to the value / variable that was passed. This method will only be called
later in this project.

- The RealNet method must have only one parameter, the argument must then be increased
by 10.95% once received.
- Use the relevant Math class method to ensure that the amount that has been increased has
no decimal places and is increased to the next whole number.
(Do not use the round method for this).

On Form 2 GUI:
- When the “Exit” buton is clicked, the project must stop debugging (form close).
- When the “Plan affordable loans” buton is clicked, a third form must load and look exactly like
Fig 3 below:
Form 3

Fig 3: Form 3

The class of form 3 must contain a method with the name SafeNet which receives the applicant’s gross
salary and total deduc�ons as arguments. The purpose of this method is to prevent an applicant from
using all the money they have le�, a�er deduc�ons and loans. This is so that they can have money le�
for the unexpected increase of day-to-day expenses and other unforeseen costs.

The method must deduct the total deduc�ons from the Gross salary and return only 81% of the
amount to the part of the program that called this method. The result must then be saved in a variable
called cau�ousPay.

- The computer mouse requires one hand that could have been used to assist the other hand
on the keyboard. Setup your GUI to ensure that the user can provide all informa�on on Form
3 only using the keyboard. They should move between controls, without the mouse, using the
tab stop buton, keyboard arrows and enter.
- Movement between controls must follow the chronological arrangement below:
Name textbox, years employed, Gross salary, Total deduc�ons, Vehicle and property finance
op�ons, assets owned, calculate affordability buton, save record buton and Clear choices
buton.

A�er providing all informa�on requested on the form and the user clicks the “Calculate Affordability”
buton.

- Whatever content may have been in the Print listbox, must be first be cleared.
- The SafeNet method must be called and will only be called within the class of Form.

The recommended monthly payment for vehicle or property must be determined in the following way:

- The RealNet method must first get called from within in Form 3, and cau�ousPay must be
passed as an argument, so that the value (monetary) of this variable is permanently changed.
- The following condi�ons apply to the maximum amount(s) of money (in percentage) to be
spent on monthly finance repayments – rela�ve to the new cau�ousPay.

Condi�ons Maximum Maximum Term – number of


vehicle finance property finance repayment years
Apply for both vehicle and finance and
currently owns no vehicle nor any property
23.5% 28.5% 6
Apply for both vehicle and property finance
and currently owns mul�ple vehicles and
proper�es 33.5% 35% 4

Apply for vehicle finance only and currently


owns either one vehicle or one property
38% 0% 5
Apply for property finance only and currently
owns either one vehicle or one property
0% 42% 5

Once the applica�on has calculated the budget and the maximum allowed payments on finance
repayments, it must display the informa�on in the Print listbox (lstPrint). Carefully study the output
example below:

- The “Save Record” buton text must turn green.


- The “Clear Choices” buton text must turn orange.
- The accumulated annual repayment on loan repayments must be displayed using a for loop.
- The reference number must be a combina�on of:
o An applica�on generated, 3-digit number with a range that can print all 3 digit number
possibili�es (excluding numbers beginning with 0 – for example 001,011 etc); and
o Succeeded by, the number of years employed.
- The amount le� to spend and save monthly is = cau�ousPay – total monthly loan repayments.
Fig 4: Form 3 containing displayed informa�on.

Social development wants to see an updated list of all recommenda�ons that the applica�on has
made, in a single text file. Therefore, in addi�on to the receipt displayed in the listbox, a
summarized record must be saved to a file in the projects default save loca�on. The File must be
called Freedom.txt .

When the “Save record” buton is clicked:

- The summarized record, as seen in the output example below must be writen to the text file
as shown in Fig 5. (No file dialogs must be used for this sec�on).
Fig 5: Sample Text file called Freedom.txt

When the “Clear choices” buton is clicked:

- All textboxes and the list box content must be cleared.


- Focus must return to the Name textbox.
- The “No Vehicle and no property” item on the listbox must be selected.
- The second radio buton “Finance Vehicle only” must be selected.

NOTE: Effec�ve and efficient programming remains important. Apply the relevant excep�on handling.
Data valida�on for the successful conversion to numeric data types and user feedback measures etc.
are required at all applicable �mes. Use the relevant C# method and required forma�ng when
displaying non string values.

PART 2
Social development is happy that the records are writen to a file. The problem is that some�mes they
do not have 3rd party so�ware to open text files, and they would prefer to read the files while s�ll in
the applica�on. Therefore, the GUI must undergo some minor adjustments.

- Readjust the “Save record” and “Clear Choices” butons size and loca�on to fit in a 3rd buton
of a similar size, called “Display saved records” as shown in Fig 6.

Fig 6: Readjusted GUI


When the “Display saved records” buton is clicked:

- Use the appropriate dialog control which allows the user to specify and select the file that they
want to open.
- All content in the selected file must be read and displayed in a listbox control of a new and
fourth Windows Form as shown in Fig 7.
- The image in the fourth form must (not in code) be set to be invisible un�l the form loads.
Then using code, the image may be come visible as soon as the form loads.

Fig 7: Form 4

A�er viewing the list of records

- When the image is clicked, the form must close.

Remember to click “Save all” regularly.

Zip and submit your project in �me – keep your own �me in addi�on to Efundi �mer.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy