You are on page 1of 5

Learning Objective: Understand the terms associated with Object Oriented Programming

Class, identifier and variables


Keywords
Class Identifier Primitive Instance variable
parameter variable Local variable Scope

This lesson is broken into two parts:

 Looking into the discreet elements


 Using the properties to program a medium complexity algorithm

PART 1 – THEORY
Activity 1 - With regards to the below UML diagram, identify and explain the properties outlined
in the table.

Person
String : name
double: height
double: weight
String: gender
int: age
sleep (int hours)
boolean: wakeup()
walk (double distance)
run (double distance, double speed)

Term Element from Description


above
Class
Identifier
Primitive
Instance Variable
Parameter Variable
Local Variable

Activity 2 – Create your own UML diagram to represent a car, identifying all of the elements from
above in your class diagram. You may add attributes and methods at your discretion.

PART 2 - PRACTICAL

Success Criteria: Define the OOP elements as requested (4 : Bronze) Construct your own UML
diagram to represent a car(5: Silver) By following the code, answer the paper 2 questions using
gained knowledge (6 : Gold) following the code for hotel visits, answer questions correctly (7:
Platinum)
Learning Objective: Understand the terms associated with Object Oriented Programming

Activity 3 – We are going to begin to look at a Paper 2 Question for Computer Science. It will be
daunting and the answers may not be instantly obvious. In small groups, work on the paper and we
will then share out thoughts.

Option D — Object-oriented programming A hotel chain has a loyalty scheme in which customers are
awarded 1000 points for each day they stay in one of their hotels. With these points, customers can
achieve one of three status levels: Gold, Silver or Bronze. The level will determine the extra services
to which they are entitled. The total number of points collected during the current year will
determine which of the three status levels they are assigned for the following year: For example
only the points collected in 2018 will determine the status level for 2019. Occasionally, new
customers receive additional bonus points as part of a promotion.

The Points class keeps details of the points and status levels of each customer.

Activity 4 – Answer questions with reference to the above code.

Success Criteria: Define the OOP elements as requested (4 : Bronze) Construct your own UML
diagram to represent a car(5: Silver) By following the code, answer the paper 2 questions using
gained knowledge (6 : Gold) following the code for hotel visits, answer questions correctly (7:
Platinum)
Learning Objective: Understand the terms associated with Object Oriented Programming

Success Criteria: Define the OOP elements as requested (4 : Bronze) Construct your own UML
diagram to represent a car(5: Silver) By following the code, answer the paper 2 questions using
gained knowledge (6 : Gold) following the code for hotel visits, answer questions correctly (7:
Platinum)
Learning Objective: Understand the terms associated with Object Oriented Programming

Extension – there are 4 questions in paper 2. This is no 2 of 4 from the same paper.

Success Criteria: Define the OOP elements as requested (4 : Bronze) Construct your own UML
diagram to represent a car(5: Silver) By following the code, answer the paper 2 questions using
gained knowledge (6 : Gold) following the code for hotel visits, answer questions correctly (7:
Platinum)
Learning Objective: Understand the terms associated with Object Oriented Programming

Success Criteria: Define the OOP elements as requested (4 : Bronze) Construct your own UML
diagram to represent a car(5: Silver) By following the code, answer the paper 2 questions using
gained knowledge (6 : Gold) following the code for hotel visits, answer questions correctly (7:
Platinum)

You might also like