CS111 Lab Test 1 (5%)
CS111 Lab Test 1 (5%)
This test requires you to implement the task given below as a C++ program.
As the programmer, you are asked to develop a program which allows the user to enter two readings in
the range 0 to 10. The readings are for temperature inside side a house and outside a house. The
program determines the lower of the two readings. The lower temperature is then used to display a
message indicating the action to be performed based on the following table:
You have to apply all the programming constructs that you have learned so far, as needed, to complete
this exercise. (decisions, loops, input validation)
Sample Run 1:
Enter reading 1: 8
Enter reading 2: 3
Wait for 10 minutes then increase heat
Program Marking Rubric
Exceptional Acceptable Amateur Unsatisfactory
Documentation The code is well Comments describe There is visible There are no comments,
documented. Comment most components, attempt to comment or poor comment; out -
(5 Marks) describes the main variables and all components and dated, irrelevant, or
components, variables, functions. Some functions. However, cryptic
functions. Comments comments might be some comments
are used to describe the dated; most might be outdated,
structure. The comment may make or only relevant to
comments are up to sense to someone someone familiar with
date. The comments unfamiliar with code the code
are relevant, and
make sense to
someone unfamiliar
with the code
(5 Marks) (3 Marks) (2 Marks) (0 Marks)
Programming The code uses layout to The layout of the The layout of the The layout of the program
Style convey the structure of program makes it program makes it is coincidental, and
the program clearly. possible to identify the possible to identify makes it difficult to
(5 Marks) Different components structure of the the structure of the identify the structure of
are easily recognized. program. Names are program with some the program. Names
Name are by meaningful in the effort. Names make are cryptic. No discernible
themselves meaningful context of the sense to a person effort was made to
if they refer to the problem. The code familiar with the adhere to common coding
specific problem and adheres to general problem. The code practices. The output
generic if they refer to good makes adheres to contains spelling
part of the code that is coding practices, and some good practices, mistakes, and does not
reusable. The code the but ignores others. make an effort to ensure
adheres to the given output is spelled Some minor spelling proper formatting
coding guideline. All correctly with only mistakes, or mistakes
output is spelt correctly minor in layout
with a proper layout. glitches in layout