Download as pdf
Download as pdf
You are on page 1of 4
Ast opportunity_exam dev. 1.1. November 2017 VAAL UNIVERSITY OF TECHNOLOGY FACULTY OF APPLIED AND COMPUTER SCIENCES DEPARTMENT OF SOFTWARE STUDIES. SUBJECT: Development software 1 (ASBDX1C) MAIN EXAMINATION (First OPPORTUNITY) DATE: June 2017 SEMESTER 1 DURATION: 3 HOURS TOTAL: 100 EXAMINER: N Mokoena MODERATOR: S$ Moyo INSTRUCTIONS: 1, Log into the current PC. 2. Map a network drive to your folder on the exam server. © Start-Run \\10.250.10.233 (log in with username: your student number; password: You will be given) © Goto Papers... © Right click — choose: map a network drive. Change the drive letter to W: Click Finish © Open W:\ASBDX1C\Student number from My Computer. This is the folder in which you must store all your project files © Save frequently. No extra time is allocated when the power fails or when you're PC must be rebooted. Alll the code must be saved in the mapped network drive. 3, Create a Visual Studio Project using your student number as the name (e.g. 2000000). Save it on the mapped network drive. 4, When handing in: Ensure the correct code is saved in your student number folder on the mapped network drive and shut down the PC. Assessment regulations: 1. Code your student number as a comment at the start of all the source code files, 2. You may not have any storage media in your possession while in the examination venue, You may also not access remote sites while in the examination venue. You may not have any notes in your possession during/atter the exam session. 3. Take the mark allocation into consideration when answering questions. Total Marks: 100 Full Marks: 100 QUESTION PAPER CONSISTS OF 3 TYPED PAGES (EXCLUDING THE FRONT PAGE) First opportunity Ast opportualty_exam dev. 1.1. November Application specifications Write the VB application code to calculate’ determine the area, number of bed rooms, the price, the number of garage and either the house has swimming pool or not. Given the data in fig, 3 that you must type in a list box as shown in fig. 1. 263, SHE7O000IYes: cat AHGAQ000INO Fig. 3. Fig. 3 is a data given to you to extract the following information: The area where a house is allocated, the number of bed rooms the house have, the price of the house, the number of garage and whether the house has swimming pool or not. Note: In figure 3, the data se4,5#145600!¥es. The first 3 characters represent the area (se4) the house is located, the digit (8) after the comma represent the number of bed rooms the house has, the digits (145600) between hash and exclamation characters represent the price of the house and characters (Yes) after the exclamation character represent that the house has a swimming pool, Note: yes means the house has a swimming pool and no means the house has no swimming pool. In the design, the application has four group boxes Inputs, Extracted data, Transaction and the Output. In inputs list box contains data for houses as given in fig 3, the numericupanddown to specify the number of garages and the button to select and process/ extract data, The extracted group box has five labels to display the extracted data from list box as shown in fig, 3. The transection group box has two radio buttons to enter deposit amount (deposit radio button) and ot to enter deposit amount (No deposit), a label to display the loan (house price) after the deposit amount is subtracted from the original price (price = originalP — deposit) and the button process fo process data as stipulated in button process below. Groupbox output consist list box and the button display to display the required output as stipulated in button display and button exit, Button Select The user must first select data fiom list box and the number of bed rooms fiom numericupanddown, When the user clicks this button the application must first call the sub input to get number of garages and data selected from the list box as shown in fig 1 and fig 3, and extract the area the house is located, the number of bed rooms, the price of a house, the numbers of garage and whether the house has 2 swimming pool or not. In this button, the application must count the houses that has a swimming pool and also the houses that has no swimming pool. Finally the application must call the sub display() to display the extracted data in various text boxes or labels as shown in group box Extracted data in fig. INote see Appendix ‘A for detailed information of functions and subs. Button Process ‘The user must first check the radio button for the deposit or no deposit transaction. If the user checked the deposit radio button, when clicking on the button process the application must pop out the input box to allow the user to enter the deposit amount as shown in fig. 2, and the application must call function caleLosnD(Q) to calculate the new price of a house after the deposit is subtracted from the original price and display the new price on the label loan Amt. as shown in fig, 3, But if the user checked the radio button no deposit the application call First opportunity {st opportunity_exam dev. 1.1. November 2017 © Code a VB application to fulfill the specifications given. (100) © Design the application form as shown in fig. 1. 2 Form a Extracted Data Peco rettoom vce (5850 —] —— Yeo Gmmer Lo a ‘Trannection: xt put (biter Fig 1. Deposit x erlerthe depose aount Cor} Corel | a ——___IFig 5. First opportunity Ast opportunity exam dev. 2.1. November 2017 function caleLoanNoD( to retain/ keep the original price of a house and display it on a label Joan Amt, Lastly the application must call the sub expencive() to determine which house is expensive and sum/ accumulate both all deposited and all original prices of houses. Button Display When the user clicks this button the application must display the value of an expensive house, the number of houses with swimming pool and also those that do not have a swimming pool, and call sub display( to display the total amount of deposit (deposited amount for all houses) and the total prices of all houses as shown in fig. 5. (original prices) Exit button ‘When the user clicks this button, the button must close the application as shown in fig. 7. [3] cosine surely you want to close the epplication Appendix A (Sub) Input( : This sub receive selected data ( data) from the list box(fig 3) and number of garages the house has from numericupanddown as reference parameters as shown in group input. [4] caleLoanNoDQ : The function receives the original price(price) of a house as value parameter and retum that pric (8) calcLoanD(Q : The function receives price of a house and the amount deposited as value parameter, calculate and return the new price after deposited amount is subtracted [3] dispiay(): The sub receives the area, number of bed rooms, the price of the house, number of garage and whether the house has swimming pool or not as value parameters and display all in corresponding labels/ textboxes as shown in fig] on group box extracted data. [9] caletotLoan() : The function receive the total deposit (all deposits) and the total Joan (all houses price) calculated and retum total left after the total deposit is subtracted from the total Joan, [3] expencive() : The sub receives the price of a house and calculate/determines the most expensive house. [6] DisplayTot(): The sub receives total deposits and total prices of houses and display as shown in fig. 5 on group box output. [3] First opportunity

You might also like