You are on page 1of 1

CS150: Introduc0on Programming Fundamentals

Class Tutorial and Lab 2 Instruc0ons


Dura%on: 2 hours – Tutorials (1 hour) and Labs (1 hour)

Objec%ves:
1. Use cin to get input
2. Use cout, \n, endline and \t to print output
3. Use named constants and cmath library funcAons in C++ expressions
4. Declare, iniAalize, assign and display values stored in variables
5. Demonstrate the applicaAon of constants
6. Write a valid C++ program based on specified output or provided pseudocode

Instruc%ons
1. Submit the previous weeks assignment, cover page included, before beginning the lab.
2. Study units 5a, 5b and pracAce all the quesAons in lab 2,3 and 4 in your own personal Ame.
3. Ensure you are in a group of 10 members only. There are 10 quesAons in this lab. Each member
of the group will have to answer one quesAon in exactly 1 hour.
4. Indicate your name, SIN and quesAon number in the top of each page of your answer, failure
to do this will result in loss of marks.
5. You are to write your C++ code, for the quesAon you have chosen, on a plain piece of paper.
Full marks will only be given for the correct code that answers the quesAon.
6. Read the ques%on carefully and answer it as it is stated. Use your digital devices (phones and
laptops) to verify your code before wriAng it down. Avoid auto generated code, e.g. ChatGPT.
7. Come with a pre-wriYen group cover page which should include the following: date, Task (.
Lab 2 - Code), group id (e.g. 3A) and a table having the following columns, student name, SIN,
QuesAon answered and score. Write each group members name and SIN. QuesAon numbers
will be entered during labs. Leave the score column blank. Missing SIN will result in loss of
marks. Do not write your lab instructors name.
8. Your final score for this lab will depend on the performance of your other group members.
Answer your quesAon correctly first before you begin to help someone else. Ensure that you
respect each other and assist each other for the best results.

NOTE:
1. Unanswered quesAons that are due to the group having less than 10 members or absent
members will result in a zero mark for those quesAons.
2. Indicate either one of the following next to the name of a group member who is experiencing
any of the following: (Sick), (Funeral) or (Test).
3. If variable names are not provided in the quesAon, create your own. Names should be
descripAve of the value they are to hold. None descripAve variable names will result in zero
mark for the quesAon.
4. If not stated in the quesAon, use any values of your choice when iniAalizing variables
5. All outputs should be informaAve of what is being displayed, e.g.” Area: 20 meters squared”.
6. Ask for guidance when not clear. Ignorance will not be accepted as an excuse.

Assignment:
With reference to units 1 to 4, each group member should design their quesAon using pseudo code
and a flow chart. You are to submit all the designs as one, having a cover page (Task: Lab 2 - Design),
on the next date of meeAng.

You might also like