NATIONAL SENIOR CERTIFICATE GRADE 12

Size: px
Start display at page:

Download "NATIONAL SENIOR CERTIFICATE GRADE 12"

Transcription

1 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2016 MARKS: 150 TIME: 3 hours This question paper consists of 21 pages.

2 Information Technology/P1 2 DBE/Feb. Mar NSC INSTRUCTIONS AND INFORMATION 1. This question paper is divided into THREE sections. Candidates must answer ALL THREE sections. 2. The duration of this examination is three hours. Because of the nature of this examination it is important to note that you will not be permitted to leave the examination room before the end of the examination session. 3. This question paper is set in programming terms that are not specific to any particular programming language (Delphi/Java (using the Netbeans IDE)). 4. Make sure that you answer the questions according to the specifications that are given in each question. Marks will be awarded according to the set requirements. 5. Answer only what is asked in each question. For example, if the question does not ask for data validation, then no marks will be awarded for data validation. 6. Your programs must be coded in such a way that they will work with any data and not just the sample data supplied or any data extracts that appear in the question paper. 7. Routines such as search, sort and selection must be developed from first principles. You may NOT use the built-in features of a programming language for any of these routines. 8. Data structures which are not supplied must be defined by you, the programmer. 9. You must save your work regularly on the disk/cd/dvd/flash disk you have been given, or on the disk space allocated to you for this examination session. 10. Make sure that your examination number appears as a comment in every program that you code, as well as on every event indicated. 11. If required, print the programming code of all the programs/classes that you completed. You will be given half an hour printing time after the examination session. 12. At the end of this examination session you must hand in a disk/cd/dvd/flash disk with all your work saved on it OR you must make sure that all your work has been saved on the disk space allocated to you for this examination session. Ensure that all files can be read.

3 Information Technology/P1 3 DBE/Feb. Mar NSC 13. The files that you need to complete this question paper have been given to you on a disk/cd/dvd/flash disk or on the disk space allocated to you. The files are provided in the form of password-protected executable files. NOTE: Delphi candidates must use the file DelphiDataENGMarch2016.exe. Java candidates must use the file JavaDataENGMarch2016.exe. Do the following: Double click on the password-protected executable file. Click on the extract button. Enter the following password: MountainP$%# Once extracted, the following list of files will be available in the folder DelphiDataENGMarch2016/JavaDataENGMarch2016: Delphi files Question1: Question1P.dpr Question1P.res Question1U.dfm Question1U.pas Question2: Gamkaskloof Pass.jpg MountainPassU.pas NoMap.jpg Prince Alfred Pass.jpg Question2P.dpr Question2P.res Question2U.dfm Question2U.pas Question3: Q3Data.txt Question3P.dpr Question3P.res Question3U.dfm Question3U.pas Java (Netbeans) files Question1: Question1.form Question1.java Question2: Gamkaskloof Pass.jpg MountainPass.java NoMap.jpg Prince Alfred Pass.jpg Question2.form Question2.java Question3: Q3Data.txt Question3.form Question3.java

4 Information Technology/P1 4 DBE/Feb. Mar NSC SCENARIO South Africa is considered to be one of the most scenic countries in the world and attract many tourists to local holiday destinations and internationally acclaimed mountain passes. Software programs are being designed to assist with the administration of tourists. SECTION A QUESTION 1: GENERAL PROGRAMMING SKILLS A variety of aspects concerning mountain passes and holiday destinations are dealt with in this question. INSTRUCTIONS: Delphi programmers The project Question1 is provided in the DelphiDataENGMarch2016 folder. Open the incomplete project file Question1P.dpr in the Question1 folder. Add your examination number as a comment in the first line of the main form unit Question1U.pas file. Java programmers The project Question1 is provided in the JavaDataENGMarch2016 folder. Open the incomplete class Question1.java contained in the folders Source Packages (src), Question1Package. Add your examination number as a comment in the first line of the class Question1.java. Do the following: Compile and execute the program. The GUI displays five sections labelled QUESTION 1.1 to QUESTION 1.5. The program currently has no functionality. An example of the GUI is given on the next page:

5 Information Technology/P1 5 DBE/Feb. Mar NSC Complete the code for each section of QUESTION 1 as described in QUESTION 1.1 to QUESTION 1.5 below. 1.1 Distances are displayed in miles on some road maps. The user is required to enter the total distance of a mountain pass in miles. Write code to convert the distance entered in miles to kilometres. Display the converted value and unit (km) in the provided output component. NOTE: 1 mile = 1,6 kilometres Example of output: (3)

6 Information Technology/P1 6 DBE/Feb. Mar NSC 1.2 Many tourists are interested in the decrease in temperature while travelling up a mountain pass. The user is required to enter the height of the mountain pass in metres. The temperature at the metre mark on the mountain pass is 18 C. The temperature decreases by 1 C for every 100 m increase in the height of the mountain pass. NOTE: The height of the mountain pass that you enter must be higher than or equal to m. Write code to do the following: Obtain the height of the mountain pass from the text box. Validate the value entered as follows: o If the value is less than 1 000, display a suitable message, clear the text box and set the focus to the text box. o If the value is greater than or equal to 1 000, calculate and display the temperature for every 100 m travelled above m up the mountain pass to the nearest 100 m below the top of the pass. Example of output if the height of the pass is m: (11) 1.3 Some tourists want to travel up the lowest mountain pass. Two parallel arrays are provided. The array named arrpassnames contains the names of mountain passes while the array named arrpassheights contains the heights of the mountain passes contained in the arrpassnames array. Write code to determine the name of the mountain pass with the lowest height. NOTE: You will be penalised for using fixed values in your code to indicate the number of elements in the arrays. Although the arrays are provided and the number of elements is known, an appropriate built-in function/method must be used to determine the number of elements in the arrays.

7 Information Technology/P1 7 DBE/Feb. Mar NSC Example of output: (6) 1.4 Tourists can book accommodation close to any of the mountain passes. The types of accommodation available and the price per person per night are given in the table below. TYPE OF ACCOMMODATION PRICE PER PERSON PER NIGHT Hotel R1 200 Bed-and-breakfast R1 000 Self-catering unit R750 Camping site R300 The price of Wi-Fi is R150 per night. Write code to do the following: Obtain the type of accommodation from the combo box. Obtain the number of people who require accommodation for this booking from the text box. Determine whether the check box control for access to Wi-Fi has been selected. Determine the cost per night according to the values entered by the user and the values from the table above. Payment options: o If the user selects the 'Cash' option, display the payment per night, in currency format with TWO decimal places, in the text box provided. o If the user selects the 'Card' option, do the following: Use a dialog box to insert the card number. Do the following TWO tests to ensure that the card number is valid: Ensure that the card number consists of 9 digits. Ensure that the card number consists of only digits.

8 Information Technology/P1 8 DBE/Feb. Mar NSC If the card number is valid: - Add a card charge of 3% to the cost. - Display the payment per night in the text box provided. If the card number is NOT valid: - Use a dialog box to display a message that the card number is invalid. - Set the radio button to the 'Cash' option. - Display the cash price as the payment per night. Example of the payment per night for the data shown in the screenshot below: Example of the payment per night for the data as shown in the screenshot below. The valid card number has been entered in the dialog box. (19) 1.5 Toll fees, which are used to maintain the mountain passes, have to be paid on mountain pass routes. The company maintaining the mountain passes is running a promotion to attract tourists to travel along the mountain passes. Each toll gate receipt has a unique transaction number. The company uses these numbers to give away prizes. The list box provided contains the prizes.

9 Information Technology/P1 9 DBE/Feb. Mar NSC The user is required to enter the transaction number that appears on a toll gate receipt. The following criteria are used to determine prize winners: If the transaction number is a prime number the person will receive a prize which is randomly selected from the prizes in the given list box. If the transaction number is a NOT a prime number the user will NOT receive a prize. Use the algorithm provided below to code the solution. Algorithm: 1. Obtain the transaction number from the text box. 2. Determine whether the transaction number is a prime number. (A prime number is a number with only TWO factors, namely 1 and the number itself.) 3. If the transaction number is a prime number, do the following: 3.1 Generate a random number in the range 1 to 4 (including 1 and 4). The random number indicates the index of the prize in the list box, which is the prize that will be allocated to the winner. 3.2 Choose the randomly generated index in the list box in order to highlight the prize. 4. If the transaction number is a NOT prime number, select the 'No prize' option in the list box. Example of output for transaction number 56284, which is NOT a prime number: 56284

10 Information Technology/P1 10 DBE/Feb. Mar NSC Example of output for transaction number 13711, which is a prime number, and 2 as the randomly generated number: NOTE: Due to the nature of the random function/method the output generated by your project/program may differ from the example above. (9) Enter your examination number as a comment in the first line of the program file. Save your program. A printout of the code may be required. TOTAL SECTION A: 48

11 Information Technology/P1 11 DBE/Feb. Mar NSC SECTION B QUESTION 2: OBJECT-ORIENTATED PROGRAMMING A group of mountain passes has been selected to determine specific statistics, such as the number of travellers, fines received by travellers and details about the danger levels of the mountain passes. INSTRUCTIONS: Delphi programmers The project Question2, provided in the DelphiDataENGMarch2016 folder, contains: o A main form unit Question2U.pas o An incomplete unit file MountainPassU.pas Open the incomplete project file Question2P.dpr and the class unit file MountainPassU.pas in the Question2 folder. Add your examination number as a comment in the first line of both files Question2U.pas and MountainPassU.pas. Java programmers The project Question2, provided in the JavaDataENGMarch2016 folder, contains: o A GUI class file Question2.java o An incomplete object class file MountainPass.java Open the incomplete classes Question2.java and MountainPass.java in the folders Source Packages (src), Question2Package. Add your examination number as a comment in the first line of both classes Question2.java and MountainPass.java. Do the following: Complete the code for each section of QUESTION 2 as described in QUESTION 2.1 and QUESTION 2.2 below. 2.1 An object class called TMountainPass/MountainPass with some methods has been provided. Complete the code in the given class (TMountainPass/MountainPass) as described in QUESTION to QUESTION

12 Information Technology/P1 12 DBE/Feb. Mar NSC The given attributes of the class TMountainPass/MountainPass are described in the table below. NAMES OF ATTRIBUTES Delphi Java DESCRIPTION fname name The name of the mountain pass fdistance distance Distance in kilometres fdangerlevel dangerlevel Low/Medium/High fgradient gradient The gradient of the steepest part of the pass in degrees, for example 25 degrees Write code for a constructor method that receives the name of a mountain pass, the distance of the pass in kilometres, the danger level and the gradient of the pass as parameters. Use the parameters to initialise the attributes of the object class. (2) Write a mutator method named setdangerlevel that updates the fdangerlevel/dangerlevel attribute to the danger level received as a parameter. (2) Write a method named calculatefine that receives the time it took the tourist to travel up the mountain pass in minutes and the speed limit applicable to this mountain pass in kilometres per hour as parameters. The method must calculate the average speed that was travelled and determine whether the speed limit was exceeded. Return a value of zero if the speed limit was NOT exceeded. If the speed limit was exceeded, calculate and return the fine to be paid. The fine is determined as follows: If the average speed exceeds the speed limit by less than 10 km/h, the fine is zero. If the average speed exceeds the speed limit by exactly 10 km/hour, then the basic fine is R500,00. If the average speed exceeds the speed limit by more than 10 km/h, an additional R100 is added to the basic fine of R500,00 for every 3 km/h or part thereof that the speed limit was exceeded by more than 10 km/h. NOTE: Average speed in km/h = distance in kilometres time in hours Examples on how to calculate fines are given on the next page.

13 Information Technology/P1 13 DBE/Feb. Mar NSC Example 1: Speed limit = 80 km/h Average speed travelled = 96 km/h Calculating the fine: R500,00 (for exceeding the speed limit by 10 km/h) + (2 x R100,00 for the additional 6 km/h by which the average speed travelled exceeded the 10 km/h range) Fine = R700,00 Example 2: Speed limit = 60 km/h Average speed travelled = 83 km/h Fine = R1 000,00 (13) Write a method named suggesteddangerlevel that receives the average rainfall on the pass over the previous seven days as a parameter. The method returns a suggested danger level (Low/Medium/High) using the following criteria: 2.2 Data and GUI: If the average rainfall is equal to or more than 10 mm and the maximum gradient of the pass exceeds 10 degrees, it is suggested that the present danger level be increased to the next danger level. Example: If the danger level is currently 'Low' it will be suggested that the danger level must be raised to 'Medium'. If an increase is not necessary or the level is already 'High', the present danger level must be returned as the suggested level. (8) The following data is supplied: The road maps of some of the mountain passes have been saved as.jpg files. The format of the file name for the maps is <Name of the mountain pass>.jpg. A two-dimensional array named arrrain contains the rainfall that was measured over a period of seven days for the three mountain passes listed in the GUI. The following GUI allows the user to select one of three mountain passes (on the next page):

14 Information Technology/P1 14 DBE/Feb. Mar NSC Complete the code for the buttons in the main form unit (Delphi)/GUI class (Java) as described in QUESTION to QUESTION below Button [Question 2.2.1] Write code to do the following: Determine the selected mountain pass from the provided radio buttons. Request the user to enter the distance, danger level and gradient of the selected mountain pass from the keyboard, using dialog boxes. Instantiate the mountain pass object. A variable for the object has been globally declared. Display a message to indicate that the object has been instantiated. (7) Button [Question 2.2.2] Write code to do the following: Use the accessor methods to display the information about the mountain pass that was entered by the user in the relevant text boxes. Test whether the road map file for the instantiated object exists. If the map file exists, replace the <No map found> image with the content of the map file in the component provided. Otherwise the <No map found> image must remain in the display area. Example of output and the correct image if the user selected Baviaanskloof Pass (see next page):

15 Information Technology/P1 15 DBE/Feb. Mar NSC Example of output and the correct image if the user selected Gamkaskloof Pass: (8) Button [Question 2.2.3] The user is required to enter the speed limit (in km/h) and the time travelled (in minutes) in the text boxes provided. Write code to do the following: Obtain the speed limit and the time travelled from the text boxes. Use these values as arguments and call the calculatefine method that must calculate and return the amount the traveller has to pay as a fine. Display the amount that should be paid as a fine, formatted as currency, in the output area. Example of output for travelling over the Prince Alfred Pass with a distance of 88 km and a speed limit of 80 km/h. The time travelled was 120 minutes.

16 Information Technology/P1 16 DBE/Feb. Mar NSC Example of output for travelling over the Gamkaskloof Pass with a distance of 75 km and a speed limit of 40 km/h. The time travelled was 88 minutes. (6) Button [Question 2.2.4] A two-dimensional array called arrrain contains the rainfall (in millimetres) measured on each of the past 7 days in each of the mountain passes the user could choose from. The row order in the array corresponds to the order of the passes in the supplied radio buttons on the GUI. Baviaanskloof: 0, 23, 13, 1, 2, 0, 14 Gamkaskloof: 33, 3, 11, 35, 3, 0, 21 Prince Alfred: 50, 0, 0, 1, 20, 0, 2 Write code to do the following: Use the tostring method to display information about the mountain pass object in the output area. Use the arrrain array and calculate the average rainfall for the mountain pass object. Use the suggesteddangerlevel method to obtain the suggested danger level for the pass based on the calculated average rainfall. Only if the suggested danger level differs from the present danger level, a dialog box must be used to ask the user whether the danger level should be changed to the suggested level or not. If the user chooses to change the danger level it must be set to the suggested level using the setdangerlevel method. Display a message in the output area, indicating whether: o No change was suggested o The suggested change was rejected o The danger level was changed Use the following data to test your program (on the next page):

17 Information Technology/P1 17 DBE/Feb. Mar NSC TEST DATA 1 TEST DATA 2 TEST DATA 3 Mountain pass Baviaanskloof Gamkaskloof Prince Alfred Distance in km Danger level Medium Low Medium Gradient NOTE: The message must indicate the danger level in upper case, as shown in the examples below. Example of output for the Baviaanskloof Pass: Example of output for the Gamkaskloof Pass if suggestion is rejected: Example of output for the Prince Alfred Pass if suggestion is accepted: (16) Enter your examination number as a comment in the first line of both files containing your code. Save your program. Print the code of both files that contain your code if printouts are required. TOTAL SECTION B: 62

18 Information Technology/P1 18 DBE/Feb. Mar NSC SECTION C QUESTION 3: PROBLEM-SOLVING PROGRAMMING SCENARIO Your dad/guardian is planning a holiday in the Eastern Cape where you can drive through various areas. He wants to determine the possible routes between different towns and whether there are mountain passes on these routes. You need to design the necessary software to assist him in this. INSTRUCTIONS: Delphi programmers The project Question3 is provided in the DelphiDataENGMarch2016 folder. Open the incomplete project file Question3P.dpr in the Question3 folder. Enter your examination number as a comment in the first line of the main form unit Question3U.pas. Java programmers The project Question3 is provided in the JavaDataENGMarch2016 folder. Open the incomplete class Question3.java contained in the Source Packages (src), Question3Package. Enter your examination number as a comment in the first line of the class Question3.java. Supplied GUI: The supplied GUI contains components for input, an output area and three buttons.

19 Information Technology/P1 19 DBE/Feb. Mar NSC DATA: The given text file Q3Data.txt contains an unknown number of lines of text (which does not exceed 50 entries). Each line consists of the name of a town of departure, the name of a neighbouring town that can be directly reached from the town of departure, the distance between the two towns and 'Yes' or 'No', indicating whether a mountain pass is included in the route or not. Different characters are used to separate the data contained in one line. Format of each line of text in the text file: <town1>;<town2>#<distance between the two towns>*<mountain pass> Example of data in the text file: Ugie;Maclear#25*No Elliot;Cala#28*Yes Queenstown;Whittlesea#32*Yes Whittlesea;Cathcart#46*No Cathcart;Hogsback#49*Yes Elliot;Ugie#51*Yes Queenstown;Cathcart#59*No : The data in the first two lines above can be interpreted as follows: The two neighbouring towns are Ugie and Maclear. The distance between the two towns is 25 km and there is no mountain pass along the route. The two neighbouring towns are Elliot and Cala. The distance between the two towns is 28 km and there is a mountain pass along the route. NOTE: You are NOT allowed to modify the supplied data manually. Code must be used to manipulate the supplied data according to the requirements. The use of good programming techniques and modular design must be applied to the design and coding of your solution. You may use appropriate data structures as you see fit.

20 Information Technology/P1 20 DBE/Feb. Mar NSC 3.1 Direct routes: The GUI allows the user to select the town of departure and the destination town from the combo boxes provided. Use the Q3Data.txt text file to determine whether there is a direct route between the two selected towns, in other words, whether they are neighbouring towns or not. If a direct route exists, display the distance between the two towns and a note to indicate whether there is a mountain pass along the route or not. NOTE: Direct routes are determined irrespective of the order in which the two neighbouring towns' names appear in the lines of text. Example of output if a direct route exists between the two selected towns and there is a mountain pass along the route: (Data in the file: Elliot;Cala#28*Yes) Example of output if a direct route exists between the two selected towns and there is no mountain pass along the route: (Data in the file: Ugie;Maclear#25*No) Example of output if there is no direct route between the two selected towns: (18)

21 Information Technology/P1 21 DBE/Feb. Mar NSC 3.2 List of neighbouring towns: The user is required to select only a town of departure from the given combo box. Display all neighbouring town(s) that can be directly reached from the selected town of departure. Also display the distance(s) between the towns. Use the data supplied in the Q3Data.txt text file to find the required towns and distances. Display the information in column format, sorted in ascending order according to the distances between the towns. A suitable heading must be displayed to indicate the town of departure. Example of output if Whittlesea is chosen as the town of departure: (22) Enter your examination number as a comment in the first line of the program file. Save your program. A printout of the code may be required. TOTAL SECTION C: GRAND TOTAL:

22 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2016 MEMORANDUM MARKS: 150 This memorandum consists of 31 pages.

23 Information Technology/P1 2 DBE/Feb. Mar GENERAL INFORMATION: These marking guidelines must used as the basis for the marking session. They were prepared for use by markers. All markers are required to attend a rigorous standardisation meeting to ensure that the guidelines are consistently interpreted and applied in the marking of candidates work.. Note that learners who provide an alternate correct solution to that given as example of a solution in the marking guidelines will be given full credit for the relevant solution, unless the specific instructions in the paper was not followed or the requirements of the question was not met Annexures A, B and C(pages 3 9) include the marking grid for each question for using either one of the two programming languages. Annexures D, E and F (pages 10 19) contain examples of solutions for Java for Questions 1 to 3 in programming code. Annexures G, H and I (pages 20 31) contain examples of solutions for Delphi for Questions 1 to 3 in programming code. Copies of Annexures A, B and C (pages 3 9) should be made for each learner and completed during the marking session.

24 Information Technology/P1 3 DBE/Feb. Mar ANNEXURE A SECTION A QUESTION 1: MARKING GRID GENERAL PROGRAMMING SKILLS CENTRE NUMBER: EXAMINATION NUMBER: QUESTION DESCRIPTION If a learner has a problem reading from a combo box, penalise only once for the error. 1.1 Button - [Question 1.1] Extract the distance from the text box as an integer Formula: Distance = Miles * 1.6 Display distance in textbox with labels MAX. MARKS 3 LEARNER' S MARKS 1.2 Button - [Question 1.2] Set temperature = 18 and Set height = 1000 Extract the height of mountain from the text box and convert to number Validate height <>1000 Display message, Clear text box and set Focus Display the heading Loop with correct condition Display height and temperature inside loop Increase height by 100 Decrease temperature by Button - [Question 1.3] Set lowest to value at first index of array heights (or to 9999) Loop through heights array If height at loop index < lowest lowest = height at loop index lowestname = name at loop index Display pass name and lowest height 6

25 Information Technology/P1 4 DBE/Feb. Mar Button - [Question 1.4] Extract the number of persons from text box as an integer Extract type of accommodation selected from combo box Case / Switch / If (accommodation type) and allocate correct cost per person to cost variable Multiply cost * number of persons Check if Wi-Fi has been selected and add R150 to total cost Check if radio button for Card is selected Use a dialog box to enter a card number Set valid flag to True If length of card number is Not 9 - Set valid flag to False Check if all characters are digits: Loop through ckaracters of card number Use method/function to check if each char is a digit If Not digit set valid flag to False If the card number is valid Add 3% of cost to total cost 19 If card number Not Valid Use a dialog box to display Invalid card number Set radio button selection to cash option Show formatted total cost per night in the text box 1.5 Button - [Question 1.5] Extract transaction number from text box as integer Set prime flag to True Loop from 2 to transaction number / 2 (or ticket number -1) If transaction number is divisible by loop counter Set prime flag to False If prime is True Generate random number in range 1 to 4 Else Set random number = 0 9 Set the value in the list box to highlight the position of the random number TOTAL: 48

26 Information Technology/P1 5 DBE/Feb. Mar ANNEXURE B SECTION B QUESTION 2: MARKING GRID OBJECT-ORIENTED PROGRAMMING CENTRE NUMBER: QUESTION Constructor: EXAMINATION NUMBER: DESCRIPTION Definition with four correct parameters and data types Initialise all four attributes using the parameters setdangerlevel method: Method definition with parameter Assign the parameter value to the danger level attribute calculatefine method: Correct parameters for time travel and speed limit Calculate the speed: Use distance attribute Divide by the travel time divide by 60 Initialise fine to 0 Check if speed greater than or equal to speedl imit increased by 10 Calculate fine: (Speed speed limit 10) Rounded up Divide by 3 Multiply by 100 Return fine as decimal value suggesteddangerlevel method: Method definition with correct parameter for average rainfall Set level to value of danger level attribute Test if Gradient > 10 AND average rainfall >= 10 If dangerlevel = Low Change level to Medium Else If danger Level = Medium Change level to High Else level = High Return level MAX. MARKS LEARNER'S MARKS

27 Information Technology/P1 6 DBE/Feb. Mar Button [Question2.2.1] Read selected mountain pass from radio button and assign to correct pass name variable Read distance from text box as integer value Read danger level from text box as String Read gradient from text box as String Instantiate object using correct values in correct order Display message to indicate object was created Button [Question2.2.2] Use object to get mountain pass name, distance, danger level and gradient Assign mountain pass name, distance, danger level and gradient to correct textfields Get the correct filename for the pass (name of the pass) Compile filename using pass name and.jpg Test if file exist If exist display correct image on component provided Button [Question2.2.3] Get speedlimit and traveltime from text boxes in the correct format Get the fine amount by calling the calculatefine method of the object and sending the correct arguments Display the fine in the correct format (Currency to 2 decimal places) 6

28 Information Technology/P1 7 DBE/Feb. Mar Button [Question2.2.4] Use tostring method to display the data of the mountain pass in the output area Initialise sum to 0 Get row value of pass selected Get the rainfall from array elements from the row Add each value to sum Calculate the average rainfall (/7) Call the determinedangerlevel method of the object If return value not the same as object's current danger level Ask if the danger level should be updated If answer = Yes 16 Call the setdangerlevel met with argument to change the danger level of the object Set the danger level in the text field to the changed value Display a message to indicate what the danger level was changed to in the output area else if answer = No Display a message to indicate that the suggestion has been rejected and the current danger level that will remain in the output area else Display a message to indicate that no change was suggested and the current danger level that will remain in the output area TOTAL: 62

29 Information Technology/P1 8 DBE/Feb. Mar ANNEXURE C SECTION C QUESTION 3: MARKING GRID PROBLEM SOLVING PROGRAMMING CENTRE NUMBER: EXAMINATION NUMBER: QUESTION 3.1 Direct route: DESCRIPTION MAX. MARKS LEARNER'S MARKS Open the text file to read from file: Delphi: AssignFile, RESET Java: Create object to read from file Set flag to False Loop through the file Read line of text Test if town of departure AND destination has been found in the line of text but are not the same then Flag = True Find position of '#', Find position of '*' Extract the Distance from the line of text If mountain pass exists (test) "Pass on route" message else "No pass" message Display all information regarding the route If flag = False Display message "Not Found" Close File 3.2 List of towns that can be visited: Declare appropriate data structures (2 arrays) Set counter to 0 (or 1 for Delphi) Get the town that was selected from the combo box Open file for reading data from file Loop through file Read line of text, extract depart town and destination Test whether town = destination town Store name of destination in names array Extract distance and store in distances array Increment counter Test whether town = depart town Store name of depart town in names array Extract distance and store in distances array Increment counter Two nested loops through distances array Comparing values Swapping names also swapping distances Loop for display and displaying towns and distances from arrays neatly in columns TOTAL 40

30 Information Technology/P1 9 DBE/Feb. Mar SUMMARY OF LEARNER S MARKS: CENTRE NUMBER: EXAMINATION NUMBER: SECTION A SECTION B SECTION C QUESTION 1 QUESTION 2 QUESTION 3 GRAND TOTAL MAX. MARKS LEARNER'S MARKS

31 Information Technology/P1 10 DBE/Feb. Mar ANNEXURE D: SOLUTION FOR QUESTION 1: JAVA package Question1Package; import java.text.decimalformat; import javax.swing.joptionpane; public class Question1_Memo extends javax.swing.jframe { //====================================================================== //Supplied code //====================================================================== String arrpassnames[] = {"Barkly Pass", "Baviaanskloof Pass", "Katberg Pass", "Baster Voetslaan Pass", "Felton Pass", "Chapmans Peak Pass"; double arrpassheights[] = {1560, 986, , 1268, 987, ; DecimalFormat df = new DecimalFormat("0.00"); public Question1_Memo() { initcomponents(); this.setlocationrelativeto(this); //====================================================================== // Question 1.1 //====================================================================== private void btnquestion1_1actionperformed(java.awt.event.actionevent evt) { String distancevalue = txfinfo.gettext(); txfdistance.settext(df.format(double.parsedouble(distancevalue) * 1.60)km"); ===================================================================== // Question 1.2 ===================================================================== private void btnquestion1_2actionperformed(java.awt.event.actionevent evt) { int temperature = 18; double height = 1000; double heighttopofmountain = Double.parseDouble(txfHeight.getText()); if(heighttopofmountain <=1000){ JOptionPane.showMessageDialog(null, "Enter a valid height"); txfheight.settext(""); else { txaoutput.settext(string.format("%-20s%- 10s%n","Metres","Temperature")); do{ txaoutput.append(string.format("%-28s%- 10s%n",height,temperature)); height += 100; temperature -= 1; while (height <= heighttopofmountain); //====================================================================== // Question 1.3 //====================================================================== private void btnquestion1_3actionperformed(java.awt.event.actionevent evt) { double lowest = arrpassheights[0];

32 Information Technology/P1 11 DBE/Feb. Mar String name = arrpassnames[0]; for (int i = 1; i < arrpassheights.length; i++) { if (arrpassheights[i] < lowest) { lowest = arrpassheights[i]; name = arrpassnames[i]; txalowestheight.settext(""); txalowestheight.append("the lowest mountain pass is " + name + ".\n The height of the pass is " + lowest + " m."); //====================================================================== // Question 1.4 //====================================================================== private void btnquestion1_4actionperformed(java.awt.event.actionevent evt) { String accommtype = (String) (cmbaccommtype.getselecteditem()); int numpersons = Integer.parseInt(txfNumPersons.getText()); double cost = 0; switch (accommtype) { case "Hotel": cost = 1200; break; case "B&B": cost = 1000; break; case "Self-catering unit": cost = 750; break; case "Camping site": cost = 300; break; cost *= numpersons; if (chbwifi.isselected()) { cost += 150; boolean flag = false; if (rbncash.isselected()) { txfpayment.settext("r " + df.format(cost)); else { String cardnumber = JOptionPane.showInputDialog("Enter card number"); if (cardnumber.length() == 9) { flag = true; for (int i = 0; i < 9; i++) { if (!Character.isDigit(cardNumber.charAt(i))) { flag = false; if (!flag) { JOptionPane.showMessageDialog(null, "Invalid card number"); rbncash.setselected(true); txfpayment.settext("r " + df.format(cost)); else { cost = cost * 1.03; txfpayment.settext("r " + df.format(cost));

33 Information Technology/P1 12 DBE/Feb. Mar //===================================================================== // Question 1.5 //===================================================================== private void btnquestion1_5actionperformed(java.awt.event.actionevent evt) { int transactionnumber = Integer.parseInt(txfNumber.getText()); Boolean prime = true; for (int i = 2; i <= transactionnumber / 2; i++) { if (transactionnumber % i == 0) { prime = false; int randnum = 0; if (prime) { randnum = (int)(math.random() * 4)+1; lstprizes.setselectedindex(randnum);

34 Information Technology/P1 13 DBE/Feb. Mar ANNEXURE E: SOLUTION FOR QUESTION 2: JAVA package Question2_Package; // Solution for Object class //====================================================================== //Supplied code //====================================================================== private String name; private int distance; private String dangerlevel; private int gradient; public String getname() { return name; public int getdistance() { return distance; public String getdangerlevel() { return dangerlevel; public int getgradient() { return gradient; //====================================================================== // Question //====================================================================== public MountainPass(String name, int distance, String dangerlevel, int gradient) { this.name = name; this.distance = distance; this.dangerlevel = dangerlevel; this.gradient = gradient; //====================================================================== // Question //====================================================================== public void setdangerlevel(string dangerlevel) { this.dangerlevel = dangerlevel; //====================================================================== // Question //====================================================================== public double calculatefine(int traveltime, int speedlimit) { double speed = distance / (traveltime / 60.0); double fine = 0; if (speed >= (speedlimit + 10)){ fine = (Math.ceil((speed - speedlimit - 10) / 3.0)) * 100; return fine;

35 Information Technology/P1 14 DBE/Feb. Mar //====================================================================== // Question //====================================================================== public String suggesteddangerlevel(double avgrain) { String level = dangerlevel; if (gradient > 10 && avgrain >= 10) { if (dangerlevel.equalsignorecase("low")) { level = "Medium"; else if(dangerlevel.equalsignorecase("medium")){ level = "High"; else{ level = "High"; return level; //====================================================================== // Supplied tostring method //====================================================================== public String tostring() { return name+" with a maximum gradient of "+ gradient +" degrees has a danger level rating of "+ dangerlevel +".\nthe distance of the pass is "+ distance+" km.";

36 Information Technology/P1 15 DBE/Feb. Mar GUI CLASS: QUESTION2_SOLUTION package Question2_Package; import java.io.file; import java.io.filenotfoundexception; import javax.swing.joptionpane; public class Question2_Memo extends javax.swing.jframe { //===================================================================== //Supplied code //====================================================================== int[][] arrrain = {{0, 23, 13, 1, 2, 0, 14, {33, 3, 11, 35, 3, 0, 21, {50, 0, 0, 1, 20, 0, 2; MountainPass mountainpassobj; String name = ""; public Question2_Memo() { initcomponents(); setlocationrelativeto(this); pnldisplay.setvisible(false); ======================================================================= // Question ======================================================================= private void btnquestion2_1_1actionperformed(java.awt.event.actionevent evt) { if (rbtpass1.isselected()) { name = rbtpass1.gettext(); if (rbtpass2.isselected()) { name = rbtpass2.gettext(); if (rbtpass3.isselected()) { name = rbtpass3.gettext(); int distance = Integer.parseInt(JOptionPane.showInputDialog("Enter the distance for the mountain pass.", "110")); String dangerlevel = JOptionPane.showInputDialog("Enter the danger level of the pass (Low/Medium/High)", "Medium"); int gradient = Integer.parseInt(JOptionPane.showInputDialog("Enter the maximum gradientt in degrees", "12")); mountainpassobj = new MountainPass(name, distance, dangerlevel, gradient); JOptionPane.showMessageDialog(rootPane, "The object for " + name + " has been instantiated."); pnldisplay.setvisible(true);

37 Information Technology/P1 16 DBE/Feb. Mar //========================================================================== // Question //====================================================================== private void btnquestion2_2_2actionperformed(java.awt.event.actionevent evt) { txfmountainpass.settext(mountainpassobj.getname()); txfdistance.settext(mountainpassobj.getdistance() + ""); txfdangerlevel.settext(mountainpassobj.getdangerlevel()); txfgradient.settext("" + mountainpassobj.getgradient()); String fname = mountainpassobj.getname() + ".jpg"; File mapfile = new File(fName); if (mapfile.exists()) { lblmap.seticon(new javax.swing.imageicon(getclass().getresource(fname))); //====================================================================== // Question //====================================================================== private void btnquestion2_2_3actionperformed(java.awt.event.actionevent evt) { int speedlimit = Integer.parseInt(txfSpeedLimit.getText()); int traveltime = Integer.parseInt(txfTravelTime.getText()); double fine = mountainpassobj.calculatefine(traveltime, speedlimit); txffine.settext(string.format(" R%.2f", fine)); //======================================================================== // Question //======================================================================== private void btnquestion2_2_4actionperformed(java.awt.event.actionevent evt) { int sum = 0; txaoutput.settext(""); txaoutput.append(mountainpassobj.tostring()); int row = 0; if (rbtpass1.isselected()) { row = 0; else if (rbtpass2.isselected()) { row = 1; else { row = 2; for (int i = 0; i < 7; i++) { sum += arrrain[row][i]; double averagerainfall = (double) sum / 7.0; String dangerlevel = mountainpassobj.suggesteddangerlevel(averagerainfall); if (!dangerlevel.equalsignorecase(mountainpassobj.getdangerlevel ())) { String answer = JOptionPane.showInputDialog("Must danger level be changed to " + dangerlevel); if (answer.equalsignorecase("yes")) { mountainpassobj.setdangerlevel(dangerlevel); txfdangerlevel.settext(dangerlevel); txaoutput.append("\n\npass danger level rating changed to " + mountainpassobj.getdangerlevel().touppercase()); else { txaoutput.append("\n\nsuggestion rejected. Pass danger level rating kept at " + (mountainpassobj.getdangerlevel().touppercase()));

38 Information Technology/P1 17 DBE/Feb. Mar else { txaoutput.append("\n\nno suggested change. Danger level remains " + (mountainpassobj.getdangerlevel().touppercase())); private void btnclosactionperformed(java.awt.event.actionevent evt) { // Supplied code System.exit(0);

39 Information Technology/P1 18 DBE/Feb. Mar ANNEXURE F: SOLUTION FOR QUESTION 3: JAVA package Question3Package; import java.io.filenotfoundexception; import java.io.filereader; import java.util.scanner; import javax.swing.joptionpane; public class Question3_Memo extends javax.swing.jframe { public Question3_Memo() { initcomponents(); setlocationrelativeto(this); ======================================================================= //Question 3.1 ======================================================================= private void btndirectroutesactionperformed(java.awt.event.actionevent evt) { String starttown = "" + cmbstart.getselecteditem(); String desttown = "" + cmbdestination.getselecteditem(); boolean found = false; try { int cnt = 0; Scanner scfile = new Scanner(new FileReader("Q3Data.txt")); while (scfile.hasnext() &&!found) { String line = scfile.nextline(); String[] temp = line.split("; # \\*"); int p1 = line.indexof(starttown); int p2 = line.indexof(desttown); int distance = Integer.parseInt(temp[2]); String pass = "Route includes a mountain pass."; if (p1 >= 0 && p2 >= 0 && p1!= p2) { found = true; if (temp[3].equals("no")) { pass = "The route does not include a mountain pass."; txaoutput.settext("the distance from " + starttown + " to " + desttown + " is " + distance + " km.\n" + pass); scfile.close(); catch (FileNotFoundException e) { JOptionPane.showMessageDialog(rootPane, e); if (!found) { txaoutput.settext("no possible route provided between " + starttown + " and " + desttown + ".");

40 Information Technology/P1 19 DBE/Feb. Mar ======================================================================= //Question 3.2 ======================================================================= private void btnallroutesactionperformed(java.awt.event.actionevent evt) { String starttown = "" + cmbstart.getselecteditem(); txaoutput.settext("towns to visit when staying in: " + starttown); // Determine all destinations int numtowns = 0; try { int cnt = 0; Scanner sc = new Scanner(new FileReader("Q3Data.txt")); while (sc.hasnext()) { String line = sc.nextline(); String[] temp = line.split("; # \\*"); if (starttown.equals(temp[0])) { visittowns[numtowns] = temp[1]; visitdistance[numtowns] = Integer.parseInt(temp[2]); numtowns++; if (starttown.equals(temp[1])) { visittowns[numtowns] = temp[0]; visitdistance[numtowns] = Integer.parseInt(temp[2]); numtowns++; catch (FileNotFoundException e) { JOptionPane.showMessageDialog(rootPane, e); sorttowns(numtowns); txaoutput.settext("towns that can be directly reached from " + starttown + "\n"); for (int cnt = 0; cnt < numtowns; cnt++) { txaoutput.append(visittowns[cnt] + "\t" + visitdistance[cnt] + "km\n"); public void sorttowns(int numtowns) { for (int outside = 0; outside < numtowns - 1; outside++) { for (int inside = outside + 1; inside < numtowns; inside++) { if (visitdistance[outside] > visitdistance[inside]) { int dist = visitdistance[outside]; visitdistance[outside] = visitdistance[inside]; visitdistance[inside] = dist; String town = visittowns[outside]; visittowns[outside] = visittowns[inside]; visittowns[inside] = town;

41 Information Technology/P1 20 DBE/Feb. Mar ANNEXURE G: SOLUTION FOR QUESTION 1: DELPHI unit Question1U; // A solution for Question 1 interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls; type TfrmQuestionONE = class(tform) bmbclose: TBitBtn; gpbquest1_1: TGroupBox; gpbquest1_4: TGroupBox; gpbquest1_2: TGroupBox; gpbquest1_3: TGroupBox; gpbquest1_5: TGroupBox; lblgps: TLabel; lbldistance: TLabel; edtinfo: TEdit; btnquest1_1: TButton; edtheight: TEdit; x: TLabel; lbltemperature: TLabel; btnquest1_2: TButton; btnquest1_3: TButton; redq1_3: TRichEdit; lblheight: TLabel; lblaccommodation: TLabel; cbotype: TComboBox; rbgpayment: TRadioGroup; lblpaymentrequired: TLabel; edtpayment: TEdit; chbwifi: TCheckBox; lblticketnumber: TLabel; lblprize: TLabel; btnquest1_5: TButton; btnquest1_4: TButton; edtnumber: TEdit; lblnumpersons: TLabel; edtnumpersons: TEdit; redout: TRichEdit; lstprizes: TListBox; edtdistance: TEdit; procedure btnquest1_1click(sender: TObject); procedure btnquest1_2click(sender: TObject); procedure btnquest1_3click(sender: TObject); procedure btnquest1_4click(sender: TObject); procedure btnquest1_5click(sender: TObject); private { Private declarations public { Public declarations var frmquestionone: TfrmQuestionONE; implementation {$R *.dfm

42 Information Technology/P1 21 DBE/Feb. Mar {$R+ uses Math; const arrpassheights: array [1..6] of Real = (1560, 986, , 1268, 986,1258.9); arrpassnames: array [1..6] of String = ('Barkly Pass', 'Baviaanskloof Pass', 'Katberg Pass', 'Baster Voetslaan Pass', 'Felton Pass', 'Chapmans Peak Pass'); // ================================================================== // Question 1.1 // ================================================================== procedure TfrmQuestionONE.btnQuest1_1Click(Sender: TObject); var sdistance : String; rdistance : Real; sdistance := edtinfo.text; rdistance := StrToFloat(sDistance) * 1.60; edtdistance.text:= FloatToStrF(rDistance, fffixed, 8,2)+' km'; // ================================================================== // Question 1.2 // ================================================================== procedure TfrmQuestionONE.btnQuest1_2Click(Sender: TObject); var rheight : Real; itemperature, iheight : Integer; iheight := 1000; itemperature := 18; rheight := StrToFloat(edtHeight.Text); if rheight >= 1000 then redout.lines.add('metres' + #9 + ' Temperature'); while iheight < rheight do redout.lines.add(inttostr(iheight) + #9#9 + IntToStr(iTemperature)); Inc(iHeight, 100); Dec(iTemperature); end else showmessage('value must be at least 1000'); edtheight.clear; edtheight.setfocus; // ================================================================== // Question 1.3 // ================================================================== procedure TfrmQuestionONE.btnQuest1_3Click(Sender: TObject); var iloop : Integer; rlow : Real; sname : String; rlow := arrpassheights[1];

43 Information Technology/P1 22 DBE/Feb. Mar sname := arrpassnames[1]; for iloop := 2 to length(arrpassnames) do if arrpassheights[iloop] < rlow then rlow := arrpassheights[iloop]; sname := arrpassnames[iloop]; redq1_3.lines.add('the lowest mountain pass is ' + sname); redq1_3.lines.add('the height of the mountain pass is ' + FloatToStr(rLow) + ' m'); // ================================================================== // Question 1.4 // ================================================================== procedure TfrmQuestionONE.btnQuest1_4Click(Sender: TObject); var icost, inumpersons, A: Integer; rtotal : Real; scardnumber : String; bvalid : Boolean; icardnumber, ierror : Integer; inumpersons := StrToInt(edtNumPersons.Text); case cbotype.itemindex of 0: icost := 1200; 1: icost := 1000; 2: icost := 750; 3: icost := 300; if chbwifi.checked then rtotal := icost * inumpersons else rtotal := icost * inumpersons; if rbgpayment.itemindex = 1 then scardnumber := inputbox('card Number', 'Enter your card number', ''); bvalid := length(scardnumber) = 9; Val(sCardNumber, icardnumber, ierror); //Alternative validation // For A := 1 to length(scardnumber) do // if NOT(sCardNumber[A] in ['0'..'9']) then // bvalid := false; if (ierror = 0) AND bvalid then rtotal := rtotal * 1.03; end else MessageDlg('The card number is invalid', mterror, [mbok], 0); rbgpayment.itemindex := 0; //if edtpayment.text := FloatToStrF( rtotal, ffcurrency, 7, 2);

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2016 MARKS: 150 TIME: 3 hours This question paper consists of 21 pages. Information Technology/P1 2 DBE/Feb. Mar. 2016 INSTRUCTIONS

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2014 MARKS: 150 TIME: 3 hours This question paper consists of 22 pages. Information Technology/P1 2 DBE/November 2014 NSC INSTRUCTIONS

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2014 MEMORANDUM MARKS: 150 This memorandum consists of 28 pages. Information Technology/P1 2 DBE/November 2014 GENERAL INFORMATION:

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2018 MARKING GUIDELINES MARKS: 150 These marking guidelines consist of 21 pages. Information Technology/P1 2 DBE/Feb. Mar. 2018

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2017 MEMORANDUM MARKS: 150 This memorandum consists of 29 pages. Information Technology/P1 2 DBE/Feb. Mar. 2017 GENERAL INFORMATION:

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2017 MARKS: 150 TIME: 3 hours This question paper consists of 18 pages. Information Technology/P1 2 DBE/November 2017 INSTRUCTIONS

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 EXEMPLAR 2014 MARKS: 150 TIME: 3 hours This question paper consists of 18 pages. Information Technology/P1 2 DBE/2014 INSTRUCTIONS AND INFORMATION

More information

SENIOR CERTIFICATE EXAMINATION

SENIOR CERTIFICATE EXAMINATION SENIOR CERTIFICATE EXAMINATION INFORMATION TECHNOLOGY P1 2015 MARKS: 150 TIME: 3 hours This question paper consists of 23 pages. Information Technology/P1 2 DBE/2015 SCE INSTRUCTIONS AND INFORMATION 1.

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2017 MARKING GUIDELINES MARKS: 150 These marking guidelines consist of 26 pages. Information Technology/P1 2 DBE/November 2017 GENERAL

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2016 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/November 2016 GENERAL INFORMATION:

More information

NATIONAL SENIOR CERTIFICATE GRADE12

NATIONAL SENIOR CERTIFICATE GRADE12 NATIONAL SENIOR CERTIFICATE GRADE12 INFORMATION TECHNOLOGY P1 NOVEMBER 2015 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/November 2015 GENERAL INFORMATION:

More information

NATIONAL SENIOR CERTIFICATE GRADE 12 INFT.1 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2010

NATIONAL SENIOR CERTIFICATE GRADE 12 INFT.1 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2010 NATIONAL SENIOR CERTIFICATE GRADE 12 INFT.1 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2010 MARKS: 120 TIME: 3 hours This question paper consists of 26 pages, 3 annexures and an information sheet. MORNING

More information

GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM

GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM Province of the EASTERN CAPE EDUCATION NATIONAL SENIOR CERTIFICATE GRADE 12 SEPTEMBER 2012 INFORMATION TECHNOLOGY P1 MEMORANDUM MARKS: 120 This memorandum consists of 11 pages. 2 INFORMATION TECHNOLOGY

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 F NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2010 MARKS: 120 TIME: 3 hours This question paper consists of 34 pages, 3 annexures and an information sheet. Information Technology/P1

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 FEBRUARY/MARCH 2015 MEMORANDUM MARKS: 150 This memorandum consists of 32 pages. Information Technology/P1 2 DBE/Feb. Mar. 2015 GENERAL INFORMATION:

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2008 MARKS: 120 TIME: 3 hours This question paper consists of 32 pages. Information Technology/P1 2 INSTRUCTIONS AND INFORMATION

More information

GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM

GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM Province of the EASTERN CAPE EDUCATION NATIONAL SENIOR CERTIFICATE GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM MARKS/PUNTE: 120 This memorandum consists of 10 pages.

More information

PROVINCIAL EXAMINATION INFORMATION TECHNOLOGY PAPER 1 JUNE 2015 GRADE 11

PROVINCIAL EXAMINATION INFORMATION TECHNOLOGY PAPER 1 JUNE 2015 GRADE 11 PROVINCIAL EXAMINATION INFORMATION TECHNOLOGY PAPER 1 JUNE 2015 GRADE 11 TIME: 3 hours MARKS: 150 Copy Right reserved This question paper consists of 10 pages. Copy Right reserved 2 MP/June 2015 INSTRUCTIONS

More information

GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM

GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM NATIONAL SENIOR CERTIFICATE NASIONALE SENIOR SERTIFIKAAT GRADE/GRAAD 11 NOVEMBER 2013 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM MARKS/PUNTE: 150 This memorandum consists of 6 pages.

More information

2. Design and Development

2. Design and Development Postage Calculator 1. The task Design and implement a program for employees of a travel agency who send out documents to the UK and EU only; the program will calculate the cost of postage. Each envelope

More information

Software Systems Development Unit AS1: Introduction to Object Oriented Development

Software Systems Development Unit AS1: Introduction to Object Oriented Development New Specification Centre Number 71 Candidate Number ADVANCED SUBSIDIARY (AS) General Certificate of Education 2014 Software Systems Development Unit AS1: Introduction to Object Oriented Development [A1S11]

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 COMPUTER APPLICATIONS TECHNOLOGY P1 FEBRUARY/MARCH 2013 MARKS: 200 TIME: 3 hours This question paper consists of 18 pages and a separate information sheet. Computer

More information

3.2 Pseudocode. Introduction. Definition. 1 Common pseudo code terms

3.2 Pseudocode. Introduction. Definition. 1 Common pseudo code terms 3.2 Introduction This section covers the use of pseudo code in the production of algorithms. Candidates should use standard computing text books to find out information on the features of programming languages

More information

Module Contact: Dr Gavin Cawley, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Gavin Cawley, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2017-18 PROGRAMMING 1 CMP-4008Y Time allowed: 2 hours Answer FOUR questions. All questions carry equal weight. Notes are

More information

COMPUTER SCIENCE Paper 2 (PRACTICAL)

COMPUTER SCIENCE Paper 2 (PRACTICAL) COMPUTER SCIENCE Paper 2 (PRACTICAL) (Maximum Marks: 30) (Time allowed: Three hours) (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time.)

More information

SENIOR CERTIFICATE EXAMINATIONS

SENIOR CERTIFICATE EXAMINATIONS SENIOR CERTIFICATE EXAMINATIONS INFORMATION TECHNOLOGY P2 2017 MARKS: 150 TIME: 3 hours This question paper consists of 15 pages. Information Technology/P2 2 DBE/2017 INSTRUCTIONS AND INFORMATION 1. This

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++ Introduction to Programming in C++ Course Text Programming in C++, Zyante, Fall 2013 edition. Course book provided along with the course. Course Description This course introduces programming in C++ and

More information

3. Convert 2E from hexadecimal to decimal. 4. Convert from binary to hexadecimal

3. Convert 2E from hexadecimal to decimal. 4. Convert from binary to hexadecimal APCS A Midterm Review You will have a copy of the one page Java Quick Reference sheet. This is the same reference that will be available to you when you take the AP Computer Science exam. 1. n bits can

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENI CERTIFICATE GRADE COMPUTER APPLICATIONS TECHNOLOGY P FEBRUARY/MARCH 05 MEMANDUM/MARKING GUIDELINE MARKS: 80 CENTRE FINAL MARK QUESTION 5 6 7 TOTAL POSSIBLE MARK 8 8 0 0 80 CANDIDATE MARK

More information

Systems and Principles Unit Syllabus

Systems and Principles Unit Syllabus Systems and Principles Unit Syllabus Level 2 Creating an event driven computer program using Java 7540-007 www.cityandguilds.com October 2010 Version 2.0 About City & Guilds City & Guilds is the UK s leading

More information

NATIONAL SENIOR CERTIFICATE GRADE 12 CATN.1 COMPUTER APPLICATIONS TECHNOLOGY P1 FEBRUARY/MARCH 2011

NATIONAL SENIOR CERTIFICATE GRADE 12 CATN.1 COMPUTER APPLICATIONS TECHNOLOGY P1 FEBRUARY/MARCH 2011 NATIONAL SENIOR CERTIFICATE GRADE 12 CATN.1 COMPUTER APPLICATIONS TECHNOLOGY P1 FEBRUARY/MARCH 2011 MARKS: 200 TIME: 3 hours This question paper consists of 20 pages and a separate information sheet. MORNING

More information

Do not open this examination paper until instructed to do so. Answer all the questions.

Do not open this examination paper until instructed to do so. Answer all the questions. M11/5/COMSC/HP2/ENG/TZ0/XX 22117012 Computer science HIGHER level Paper 2 Friday 20 May 2011 (morning) 2 hours 15 minutes INSTRUCTIONS TO CANDIDATES Do not open this examination paper until instructed

More information

a) Answer all questions. b) Write your answers in the space provided. c) Show all calculations where applicable.

a) Answer all questions. b) Write your answers in the space provided. c) Show all calculations where applicable. Name: Please fill in your Student Number and Name. Student Number : Student Number: University of Cape Town ~ Department of Computer Science Computer Science 1015F ~ 2008 January Exam Question Max Internal

More information

Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education. Published

Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education. Published Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education COMPUTER SCIENCE 0478/21 Paper 2 MARK SCHEME Maximum Mark: 50 Published This mark scheme

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE COMPUTER APPLICATION TECHNOLOGY P FEBRUARY/MARCH 0 MEMORANDUM MARKS: 00 FINAL MARK CENTRE SPEED ENDORSEMENT WPM QUESTION 4 5 6 7 TOTAL POSSIBLE MARK 4 7 4 0 4 00 CANDIDATE

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2008 MEMORANDUM The memorandum consists of 35 pages. Information Technology/P1 2 DoE/November 2008 General information: Pages 2 12

More information

NATIONAL SENIOR CERTIFICATE GRADE 12

NATIONAL SENIOR CERTIFICATE GRADE 12 NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2013 MARKS: 120 TIME: 3 hours This question paper consists of 16 pages and 3 annexures. Information Technology/P1 2 DBE/November

More information

University of Cape Town ~ Department of Computer Science. Computer Science 1015F ~ 2007

University of Cape Town ~ Department of Computer Science. Computer Science 1015F ~ 2007 Name: Please fill in your Student Number and Name. Student Number : Student Number: University of Cape Town ~ Department of Computer Science Computer Science 1015F ~ 2007 Supplementary Examination Question

More information

What two elements are usually present for calculating a total of a series of numbers?

What two elements are usually present for calculating a total of a series of numbers? Dec. 12 Running Totals and Sentinel Values What is a running total? What is an accumulator? What is a sentinel? What two elements are usually present for calculating a total of a series of numbers? Running

More information

Software Development Techniques. December Sample Exam Marking Scheme

Software Development Techniques. December Sample Exam Marking Scheme Software Development Techniques December 2015 Sample Exam Marking Scheme This marking scheme has been prepared as a guide only to markers. This is not a set of model answers, or the exclusive answers to

More information

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8 Epic Test Review 1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4 Write a line of code that outputs the phase Hello World to the console without creating a new line character. System.out.print(

More information

CSI 1100 / 1500 Fall 2004 Introduction to Computer Science I Final Examination

CSI 1100 / 1500 Fall 2004 Introduction to Computer Science I Final Examination CSI 1100 / 1500 Final Examination Page 1 of 13 CSI 1100 / 1500 Fall 2004 Introduction to Computer Science I Final Examination Duration : 3 hours 09:30 December 9, 2004 Professors: Alan Williams, Daniel

More information

Maintenance OVERVIEW. 2 STARTUP 3 GETTING STARTED / SYSTEM BACKUPS. 4 SYSTEM USERS.. 5

Maintenance OVERVIEW. 2 STARTUP 3 GETTING STARTED / SYSTEM BACKUPS. 4 SYSTEM USERS.. 5 Maintenance Getting Started Security General Maintenance OVERVIEW. 2 STARTUP 3 GETTING STARTED / SYSTEM BACKUPS. 4 SYSTEM USERS.. 5 PREFERENCES 6 STATION. 9 ORGANIZATION ( CHARITY )... 9 SESSION. 10 SESSION

More information

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education *0000000000* UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education INFORMATION AND COMMUNICATION TECHNOLOGY 0417/02 Paper 2 Practical Test May/June

More information

Q2. What will be displayed in jtextfield1 and jtextfield2 after the following code is executed:

Q2. What will be displayed in jtextfield1 and jtextfield2 after the following code is executed: Q1. Holiday Homework, 2018-19 Class: XI Subject : Informatics Practices Q2. What will be displayed in jtextfield1 and jtextfield2 after the following code is executed: int num = 35, num1 = 46 ; jtextfield1.settext(

More information

Cvent Passkey. Group Booking. User Guide v1.0. February 2017

Cvent Passkey. Group Booking. User Guide v1.0. February 2017 Cvent Passkey Group Booking User Guide v1.0 February 2017 Overview... 4 Group Booking Concepts... 4 Enabling Group Booking... 5 Organization or Hotel Profile... 5 Bundles... 5 Event... 5 Configuring Attendee

More information

MotelMate. Demo guide. Motel Managment Software from Skagerrak Software. Thank you for trying MotelMate!

MotelMate. Demo guide. Motel Managment Software from Skagerrak Software. Thank you for trying MotelMate! MotelMate Motel Managment Software from Skagerrak Software Demo guide Installing and Opening the Demo. To install the Motel Mate Demo on Windows or Mac: 1. Insert the demo disk into the CD drive. 2. Open

More information

INFORMATION TECHNOLOGY: PAPER II. 1. This question paper consists of 9 pages. Please check that your question paper is complete.

INFORMATION TECHNOLOGY: PAPER II. 1. This question paper consists of 9 pages. Please check that your question paper is complete. NATIONAL SENIOR CERTIFICATE EXAMINATION NOVEMBER 2011 INFORMATION TECHNOLOGY: PAPER II Time: 3 hours 120 marks PLEASE READ THE FOLLOWING INSTRUCTIONS CAREFULLY 1. This question paper consists of 9 pages.

More information

CO Java SE 8: Fundamentals

CO Java SE 8: Fundamentals CO-83527 Java SE 8: Fundamentals Summary Duration 5 Days Audience Application Developer, Developer, Project Manager, Systems Administrator, Technical Administrator, Technical Consultant and Web Administrator

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;

More information

SEMESTER 1, 2011 EXAMINATIONS. CITS1200 Java Programming FAMILY NAME: GIVEN NAMES:

SEMESTER 1, 2011 EXAMINATIONS. CITS1200 Java Programming FAMILY NAME: GIVEN NAMES: Computer Science & Software Engineering SEMESTER 1, 2011 EXAMINATIONS CITS1200 Java Programming FAMILY NAME: GIVEN NAMES: STUDENT ID: SIGNATURE: This Paper Contains: 26 pages (including title page) Time

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University 9/5/6 CS Introduction to Computing II Wayne Snyder Department Boston University Today: Arrays (D and D) Methods Program structure Fields vs local variables Next time: Program structure continued: Classes

More information

Outline. Parts 1 to 3 introduce and sketch out the ideas of OOP. Part 5 deals with these ideas in closer detail.

Outline. Parts 1 to 3 introduce and sketch out the ideas of OOP. Part 5 deals with these ideas in closer detail. OOP in Java 1 Outline 1. Getting started, primitive data types and control structures 2. Classes and objects 3. Extending classes 4. Using some standard packages 5. OOP revisited Parts 1 to 3 introduce

More information

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education *0000000000* INFORMATION AND COMMUNICATION TECHNOLOGY 0417/02 Paper 2 Practical Test October/November

More information

Chapter 6. Repetition Statements. Animated Version The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 6. Repetition Statements. Animated Version The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 6 Repetition Statements Animated Version required for reproduction or display. Chapter 6-1 Objectives After you have read and studied this chapter, you should be able to Implement repetition control

More information

Introduction to Computer Science Midterm 3 Fall, Points

Introduction to Computer Science Midterm 3 Fall, Points Introduction to Computer Science Fall, 2001 100 Points Notes 1. Tear off this sheet and use it to keep your answers covered at all times. 2. Turn the exam over and write your name next to the staple. Do

More information

University of Cape Town ~ Department of Computer Science. Computer Science 1015F ~ 2007

University of Cape Town ~ Department of Computer Science. Computer Science 1015F ~ 2007 Name: Please fill in your Student Number and Name. Student Number : Student Number: University of Cape Town ~ Department of Computer Science Computer Science 1015F ~ 2007 Final Examination Question Max

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All for repetition statement do while repetition statement switch multiple-selection statement break statement continue statement Logical

More information

McGill University School of Computer Science COMP-202A Introduction to Computing 1

McGill University School of Computer Science COMP-202A Introduction to Computing 1 McGill University School of Computer Science COMP-202A Introduction to Computing 1 Midterm Exam Thursday, October 26, 2006, 18:00-20:00 (6:00 8:00 PM) Instructors: Mathieu Petitpas, Shah Asaduzzaman, Sherif

More information

YEAH 2: Simple Java! Avery Wang Jared Bitz 7/6/2018

YEAH 2: Simple Java! Avery Wang Jared Bitz 7/6/2018 YEAH 2: Simple Java! Avery Wang Jared Bitz 7/6/2018 What are YEAH Hours? Your Early Assignment Help Only for some assignments Review + Tips for an assignment Lectures are recorded, slides are posted on

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming Java Syntax Program Structure Variables and basic data types. Industry standard naming conventions. Java syntax and coding conventions If Then Else Case statements Looping (for,

More information

9713 APPLIED INFORMATION AND COMMUNICATION 9713/02 Paper 2 (Practical Test A), maximum raw mark 120

9713 APPLIED INFORMATION AND COMMUNICATION 9713/02 Paper 2 (Practical Test A), maximum raw mark 120 UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS GCE Advanced Subsidiary Level and GCE Advanced Level MARK SCHEME for the May/June 2009 question paper for the guidance of teachers 9713 APPLIED INFORMATION

More information

Check out how to use the random number generator (introduced in section 4.11 of the text) to get a number between 1 and 6 to create the simulation.

Check out how to use the random number generator (introduced in section 4.11 of the text) to get a number between 1 and 6 to create the simulation. Chapter 4 Lab Loops and Files Lab Objectives Be able to convert an algorithm using control structures into Java Be able to write a while loop Be able to write an do-while loop Be able to write a for loop

More information

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education *1280859186* UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education INFORMATION AND COMMUNICATION TECHNOLOGY 0417/02 Paper 2 Practical Test May/June

More information

Lab 3 Due March 18 at midnight

Lab 3 Due March 18 at midnight Lab 3 Due March 18 at midnight For this lab, if you choose, you may work with a partner. You may also choose to work alone. If you decide to work with a partner, you must choose a partner who has the same

More information

Concur Expense QuickStart Guide. Concur Technologies Version 1.8

Concur Expense QuickStart Guide. Concur Technologies Version 1.8 Concur Expense QuickStart Guide Concur Technologies Version 1.8 September 7, 2017 2004 2017 Concur. All rights reserved. 1 Document Revision History Date Description Version Author 08/22/2014 Concur Expense

More information

NATIONAL SENIOR CERTIFICATE GRADE 11

NATIONAL SENIOR CERTIFICATE GRADE 11 NATIONAL SENIOR CERTIFICATE GRADE 11 INFORMATION TECHNOLOGY P1 EXEMPLAR 2007 MARKS: 120 TIME: 3 hours This question paper consists of 9 pages. Information Technology/P1 2 INSTRUCTIONS AND INFORMATION 1.

More information

Delphi Generics.Collections

Delphi Generics.Collections Delphi Generics.Collections Copyright(C) 2008 Embarcadero Technologies, Inc. All Rights Reserved. Delphi Generics.Collections Table of Contents Generics.Collections.TCollectionNotification 1 Generics.Collections.TCollectionNotifyEvent

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp... 1 of 8 8/27/2014 2:15 PM Units: Teacher: ProgIIIAPCompSci, CORE Course: ProgIIIAPCompSci Year: 2012-13 Computer Systems This unit provides an introduction to the field of computer science, and covers the

More information

Booking vacation packages (general)

Booking vacation packages (general) Outrigger Hotels and Resorts Vacations FAQs: Booking vacation packages (general) Am I booking my vacation package directly with Outrigger Hotels and Resorts? No, your booking is handled through Global

More information

SELECTION. (Chapter 2)

SELECTION. (Chapter 2) SELECTION (Chapter 2) Selection Very often you will want your programs to make choices among different groups of instructions For example, a program processing requests for airline tickets could have the

More information

COMP-202B - Introduction to Computing I (Winter 2011) - All Sections Example Questions for In-Class Quiz

COMP-202B - Introduction to Computing I (Winter 2011) - All Sections Example Questions for In-Class Quiz COMP-202B - Introduction to Computing I (Winter 2011) - All Sections Example Questions for In-Class Quiz The in-class quiz is intended to give you a taste of the midterm, give you some early feedback about

More information

Software Development Techniques. 26 November Marking Scheme

Software Development Techniques. 26 November Marking Scheme Software Development Techniques 26 November 2015 Marking Scheme This marking scheme has been prepared as a guide only to markers. This is not a set of model answers, or the exclusive answers to the questions,

More information

CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2015

CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2015 CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2015 Name: This exam consists of 6 problems on the following 7 pages. You may use your single-sided handwritten 8 ½ x 11 note sheet during

More information

MARKING GUIDELINE -1- NC1710(E)(O29)V OFFICE DATA PROCESSING MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER 2009

MARKING GUIDELINE -1- NC1710(E)(O29)V OFFICE DATA PROCESSING MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER 2009 MARKING GUIDELINE -1- NC1710(E)(O29)V MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER 2009 NQF LEVEL 4 This memorandum consists of 17 pages. MARKING GUIDELINE -2- NC1710(E)(O29)V National

More information

M11/5/COMSC/HP2/ENG/TZ0/XX/M MARKSCHEME. May 2011 COMPUTER SCIENCE. Higher Level. Paper pages

M11/5/COMSC/HP2/ENG/TZ0/XX/M MARKSCHEME. May 2011 COMPUTER SCIENCE. Higher Level. Paper pages M11/5/COMSC/HP2/ENG/TZ0/XX/M MARKSCHEME May 2011 COMPUTER SCIENCE Higher Level Paper 2 13 pages 2 M11/5/COMSC/HP2/ENG/TZ0/XX/M This markscheme is confidential and for the exclusive use of examiners in

More information

1. Which of the following is the correct expression of character 4? a. 4 b. "4" c. '\0004' d. '4'

1. Which of the following is the correct expression of character 4? a. 4 b. 4 c. '\0004' d. '4' Practice questions: 1. Which of the following is the correct expression of character 4? a. 4 b. "4" c. '\0004' d. '4' 2. Will System.out.println((char)4) display 4? a. Yes b. No 3. The expression "Java

More information

Introduction to Computer Science Unit 2. Notes

Introduction to Computer Science Unit 2. Notes Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and

More information

Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal

Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal Lesson Goals Understand Control Structures Understand how to control the flow of a program

More information

CS 106 Introduction to Computer Science I

CS 106 Introduction to Computer Science I CS 106 Introduction to Computer Science I 03 / 28 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Object oriented programming More of creating our own classes Valid ways to call

More information

Eng. Mohammed S. Abdualal

Eng. Mohammed S. Abdualal Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Computer Programming Lab (ECOM 2114) Created by Eng: Mohammed Alokshiya Modified by Eng: Mohammed Abdualal Lab 3 Selections

More information

This exam is open book. Each question is worth 3 points.

This exam is open book. Each question is worth 3 points. This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or

More information

JAVA PROGRAMMING LAB. ABSTRACT In this Lab you will learn to write programs for executing statements repeatedly using a while, do while and for loop

JAVA PROGRAMMING LAB. ABSTRACT In this Lab you will learn to write programs for executing statements repeatedly using a while, do while and for loop Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Computer Programming Lab (ECOM 2114) ABSTRACT In this Lab you will learn to write programs for executing statements repeatedly

More information

Introduction to Programming. January Examination Paper. Time: 3 hours

Introduction to Programming. January Examination Paper. Time: 3 hours Introduction to Programming January 2016 Examination Paper Answer ALL questions. Produce a Word document using the instructions provided in the Background information section. Time: 3 hours The maximum

More information

Assignment 2: Temperature Class

Assignment 2: Temperature Class Assigned: September 23, 2016 Due: October 03, 2016, 11:59:59pm Assignment 2: Temperature Class Purpose The purpose of this project is to provide you more practice with implementing classes. Here you will

More information

Grade 11 June 2016 Practical Exam. Please note:

Grade 11 June 2016 Practical Exam. Please note: Please note: This papers consist of 12 pages excluding the cover page please make sure your paper is complete You will receive together with the question paper an examination folder called Gr_11JuneData_2016,

More information

Contents Chapter 1 Introduction to Programming and the Java Language

Contents Chapter 1 Introduction to Programming and the Java Language Chapter 1 Introduction to Programming and the Java Language 1.1 Basic Computer Concepts 5 1.1.1 Hardware 5 1.1.2 Operating Systems 8 1.1.3 Application Software 9 1.1.4 Computer Networks and the Internet

More information

Chapter 2. Elementary Programming

Chapter 2. Elementary Programming Chapter 2 Elementary Programming 1 Objectives To write Java programs to perform simple calculations To obtain input from the console using the Scanner class To use identifiers to name variables, constants,

More information

CS201 Spring2009 Solved Sunday, 09 May 2010 14:57 MIDTERM EXAMINATION Spring 2009 CS201- Introduction to Programming Question No: 1 ( Marks: 1 ) - Please choose one The function of cin is To display message

More information

2 nd Annual Meeting for Abacus North America Members

2 nd Annual Meeting for Abacus North America Members 2 nd Annual Meeting for Abacus North America Members April 30 May 1, 2019 The Ritz-Carlton Atlanta Atlanta, Georgia USA The Meeting Abacus Worldwide brings firms together on a global scale but our Regional

More information

Our first program is a simple calculator, which will carry out the arithmetic operations of adding, subtracting, multiplying and dividing numbers.

Our first program is a simple calculator, which will carry out the arithmetic operations of adding, subtracting, multiplying and dividing numbers. Chapter 2: Calculations 29 2 Calculations Most computer programs need to carry out calculations, for example: with money, quantities of materials, or dates and times. In this chapter, we will examine how

More information

SCOPE. public class ABC { public static void main( String args [ ] ) { Not accessible outside the block. Local to this block; accessible within it

SCOPE. public class ABC { public static void main( String args [ ] ) { Not accessible outside the block. Local to this block; accessible within it SCOPE The scope of a declaration is its range within the written computer program. Inside its scope, the declared identifier represents the declared entity. Outside the scope, the identifier is either

More information

Mark Scheme. Additional Sample Assessment Materials. Pearson BTEC Level 3 - Computing. Unit 1: Principles of Computer Science

Mark Scheme. Additional Sample Assessment Materials. Pearson BTEC Level 3 - Computing. Unit 1: Principles of Computer Science Scheme Additional Sample Assessment Materials Pearson BTEC Level 3 - Computing Unit 1: Principles of Computer Science Edexcel and BTEC Qualifications Edexcel and BTEC qualifications come from Pearson,

More information

Two hours QUESTION PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Two hours QUESTION PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Two hours QUESTION PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE High-Level Programming (Java) Date: Thursday 20th January 2011 Time: 14:00-16:00 Answer

More information

Control Statements: Part 1

Control Statements: Part 1 4 Let s all move one place on. Lewis Carroll Control Statements: Part 1 The wheel is come full circle. William Shakespeare How many apples fell on Newton s head before he took the hint! Robert Frost All

More information

Concur Travel User Guide

Concur Travel User Guide Concur Travel User Guide 1 Table of Contents What is Concur?... 3 Concur Modules... 3 Logging on to Concur... 5 Exploring the Home Page... 6 Updating Your Travel Profile... 7 Personal Information... 7

More information

NEO CONVENT SR. SEC. SCHOOL, PASCHIM VIHAR, DELHI 63 Paper IP, Class XI-C, Unit Test 1 ( ) Answer Key Max. Marks: 40

NEO CONVENT SR. SEC. SCHOOL, PASCHIM VIHAR, DELHI 63 Paper IP, Class XI-C, Unit Test 1 ( ) Answer Key Max. Marks: 40 NEO CONVENT SR. SEC. SCHOOL, PASCHIM VIHAR, DELHI 63 Paper IP, Class XI-C, Unit Test (0.07.07) Answer Key Max. Marks: 40 Q.a) b) c) d) e) f) Ans. What are the major strengths and weaknesses of a computer?

More information

In this chapter we will examine arrays, and the ways that they can be used in combination with loop structures to process data in programs.

In this chapter we will examine arrays, and the ways that they can be used in combination with loop structures to process data in programs. Chapter 5: Loops and arrays 117 5 Loops and arrays In this chapter we will examine arrays, and the ways that they can be used in combination with loop structures to process data in programs. The first

More information