Prog 6112 Ta
Prog 6112 Ta
Prog 6112 Ta
20; 21 2021
MODULE NAME: MODULE CODE:
PROGRAMMING 1B PROG6112
ASSESSMENT TYPE: TEST (PAPER ONLY)
TOTAL MARK ALLOCATION: 60 MARKS
TOTAL HOURS: 1.5 HOURS (+10 minutes reading time)
INSTRUCTIONS:
1. Please adhere to all instructions in the assessment booklet.
2. Independent work is required.
3. Five minutes per hour of the assessment to a maximum of 15 minutes is dedicated to
reading time before the start of the assessment. You may make notes on your question
paper, but not in your answer sheet. Calculators may not be used during reading time.
4. You may not leave the assessment venue during reading time, or during the first hour or
during the last 15 minutes of the assessment.
5. Ensure that your name is on all pieces of paper or books that you will be submitting. Submit
all the pages of this assessment’s question paper as well as your answer script.
6. Answer all the questions on the answer sheets or in answer booklets provided. The phrase
‘END OF PAPER’ will appear after the final set question of this assessment.
7. Remember to work at a steady pace so that you are able to complete the assessment within
the allocated time. Use the mark allocation as a guideline as to how much time to spend on
each section.
Additional instructions:
1. This is an OPEN BOOK assessment.
2. Calculators are allowed.
3. For open book assessments the students may have open access to all resources inclusive of
notes, books (hardcopy and e‐books) and the internet. These resources may be accessed as
hard copies or as electronic files on electronic devices. All electronic devices batteries must
be fully charged before the assessment as no charging of devices will be permitted during
the sitting of the assessment. The IIE and associated brands accept no liability for the loss or
damage incurred to electronic devices used during open book assessments.
4. Answer All Questions.
5. Instructions for assessments including practical computer work:
Use of good programming practice and comments in code is compulsory.
Save your application in the location indicated by the administrator (e.g., the Z:\ drive
or your local drive).
Create a folder as follows: use the module code and your own student number and
create a folder with a folder name as per the format shown here:
StudentNumber_ModuleCode_Test. Save all files (including any source code files,
template files, design files, image files, text files, database files, etc.) within this
folder.
© The Independent Institute of Education (Pty) Ltd 2021
Page 1 of 6
19; 20; 21 2021
E.g., if your student number is 12345, and you are writing an examination for the
module PROG121, create a folder named 12345_Prog121_Test and use this
throughout the session to save all your files.
Important: Upon completion of your assessment, you must save and close all your
open files and double click the ExamLog application on your desktop. You must follow
the instructions carefully to ensure that the information about the files that you have
submitted for this assessment has been logged on the network. Specify the location of
your source code on your question paper.
© The Independent Institute of Education (Pty) Ltd 2021
Page 2 of 6
19; 20; 21 2021
Question 1 (Marks: 30)
Write a Java program to display a three‐month delivery report for three different years. The
following rows and columns represent the deliveries made for each year.
JAN FEB MAR
DELIVERIES 2018 128 135 139
DELIVERIES 2019 155 129 175
DELIVERIES 2020 129 130 185
Using a Two‐Dimensional array, produce the deliveries report, including the deliveries made
statistics. The deliveries made statistics must display the total, maximum and minimum deliveries
made in the two‐dimensional array.
Example of output:
Marking Guideline Mark Examiner Moderator
Declaration and Population of Two‐Dimensional Array 8
Excellent: Correct declaration: 8 marks
Good: Correct but just a minor error: 5 – 7 marks
Developing: Attempted but not correct: 2 – 4 marks
Poor: Not attempted: 0 marks
© The Independent Institute of Education (Pty) Ltd 2021
Page 3 of 6
19; 20; 21 2021
Printing of the rows and columns 7
Excellent: Correct print of rows and columns: 7 marks
Good: Correct but just a minor error: 5 – 6 marks
Developing: Attempted but not correct: 2 – 4 marks
Poor: Not attempted: 0 marks
Determining the average, maximum and minimum 7
deliveries
Excellent: Correct calculations: 7 marks
Good: Correct but just a minor error: 4 – 6 marks
Developing: Attempted but not correct: 2 – 3 marks
Poor: Not attempted: 0 marks
Printing the average, maximum and minimum deliveries 3
Excellent: Correct printing: 3 marks
Good: Correct printing but just a minor error: 2 marks
Developing: Attempted printing but not correct: 1 mark
Poor: Not attempted: 0 marks
Report produced as per sample 3
Excellent: Report produced correctly: 3 marks
Good: Attempted but not correct: 2 marks
Developing: Attempted but not correct: 1 mark
Poor: Not attempted – 0 marks
Comments 2
TOTAL 30
© The Independent Institute of Education (Pty) Ltd 2021
Page 4 of 6
19; 20; 21 2021
Question 2 (Marks: 30)
Design a console application that will capture and print the ingredients for a baking application.
Use an abstract class named Recipes that contains variables to store the ingredients, time to make
and the difficulty level. Create a constructor that accepts the ingredients, time to make and
difficulty level as parameters, and create get methods for the variables.
The Recipes class must implement an iRecipes interface that contains the following:
public interface iRecipes
{
public void PrintRecipes();
}
Create a subclass called ProcessRecipe that extends the Recipes class. The ProcessRecipes class
must contain a constructor to accept the ingredients, time to make and the difficulty level. Next,
write code for the PrintRecipes() method, which displays the ingredients, time to make and the
difficulty level to create.
Finally, write a BakingApplication class to instantiate the ProcessRecipes class. Sample output is
shown below, and you may use the same values to test your application.
Example of input and output:
Marking Guideline Mark Examiner Moderator
iRecipes interface class created 6
Excellent: Correct declaration: 6 marks
Good: Correct, but just a minor error: 4 – 5 marks
Developing: Attempted but not correct: 2 – 3 marks
Poor: Not attempted: 0 marks
© The Independent Institute of Education (Pty) Ltd 2021
Page 5 of 6
19; 20; 21 2021
The abstract class was created with Constructor, 10
Variables, Methods and Input and Output. Implements
the Interface.
Excellent: Correct: 10 marks
Good: Correct, but just a minor error:5 – 9 marks
Developing: Attempted but not correct: 2 – 4 marks
Poor: Not attempted: 0 marks
ProcessRecipe class created that extends the Recipes class 7
Excellent: Correct: 7 marks
Good: Correct, but just a minor error: 4 – 6 marks
Developing: Attempted but not correct: 2 – 3 marks
Poor: Not attempted: 0 marks
Use the Baking Application class to capture input and 3
instantiate the Process Recipes class
Excellent: Correct: 3 marks
Good: Correct, but just a minor error: 2 marks
Developing: Attempted but not correct: 1 mark
Poor: Not attempted: 0 marks
Output produced as per sample 3
Excellent: Correct: 3 marks
Good: Attempted but not correct: 2 marks
Poor: Not attempted: 1 mark
Comments 1
TOTAL 30
END OF PAPER
© The Independent Institute of Education (Pty) Ltd 2021
Page 6 of 6