Professional Documents
Culture Documents
Name Grade 9
617761 NQA Registration #
ATHS ID
Qualification: Certificate 3
Use the dot notation to call and modify a method (function) within a 1 2 3 4 5*
PC5.6 Swift programming platform
☐ ☐ ☐ ☐ ☐
1 2 3 4 5*
Declare and initialize an instance of an object (type) within a program
PC5.8
that solve a specific problem in Swift programming platform ☐ ☐ ☐ ☐ ☐
1 2 3 4 5*
Design algorithms to solve problems and considering the
GC6.4
efficiency and complexity factors ☐ ☐ ☐ ☐ ☐
Assessment writer
Signature:
Learner’s declaration
I certify that the work submitted for this assignment is my own. I have clearly referenced any sources used in
the work. I understand that false declaration is a form of malpractice.
5.1-Identified Objects (types) as blueprints that have features called properties and
behaviors called methods
5.2-Identified with examples what is the object’s properties and methods to the program
and how to access them
5.3-Identified with examples what is the object’s properties and methods to the program
and how to access them
5.4-Used the dot notation to access and change a property of an instance within a Swift
programming platform
5.5-Used the dot notation to access and change a property of an instance within a Swift
programming platform
5.6-Used the dot notation to call and modify a method (function) within a Swift
programming platform
5.7-Defined factoring program codes as a process to restructure existing programs and
create reusable codes (functions) within Swift programming platform
5.8-Declared and initialize an instance of an object (type) within a program that solve a
specific problem in Swift programming platform
6.1-Explored the Computational thinking as an approach to problem-solving with four key
thinking processes including decomposition, pattern recognition, abstraction, and
algorithmic design
6.2-Decomposed computing problems into smaller components that can be solved using
constructs such as procedures, modules and/or objects
Assessor’s approval
Notes:
The instructor has the right to change or modify the assessment questions as long as he/she is
fulfilling the specification of the listed Performance Criteria.
If the instructor changes the questions, they have to be verified by an assessor.
When uploading the assessments to your ePortfolio, please follow the evidence naming
convention
Question 1- Presentation
An object in Swift is a value type that complies with a protocol, or an instance of a class.
An object's properties are its variables or constants that hold data. They serve as a
representation of the qualities or features of the thing.
Functions linked to a specific type, class, or instance are called methods. They specify the type
of behavior or acts that an object is capable of.
.
Question 2- Programming
Complete the activity “Corners of the World” in Swift Playgrounds app Learn to Code 2.
Add screenshot of your Code & Output
Question 3- Programming
a. pinkPortal.isActive = True
b. expert.color = moveForward
c. pinkPortal.isActive = False
d. expert.moveForward( )
3- Complete the activity “Initializing your Expert” in Swift Playgrounds app Learn to Code 2.
4- Complete the activity “Training your Expert” in Swift Playgrounds app Learn to Code 2.
Question 4- Programming
a. Initialization is the act of creating a new instance of a type, which includes setting initial
b. It Takes Two
2- Decomposition involves breaking down a complex problem into smaller parts that are more
manageable and easier to understand. For example, to decompose the problem of how to brush
our teeth, we would need to consider:
You are asked to create an app, which is a complex problem, as there are lots of things to consider.
3- What is meant by Algorithmic Thinking? Explain briefly how algorithms operate to solve
problems and perform tasks.
Algorithmic reasoning is derived from coding and computer science. By developing a sequence of methodical,
logical procedures that process a certain set of inputs and generate a predetermined set of outputs depending
on them, this methodology automates the problem-solving process..
1- Write an initial Algorithm to detect overspeed cars by the radar camera, and report the
violence to the traffic system. Think about all details should be included in the notification
report ( the car plate num, location, date, time, speed…..
. Start
2. Initialize camera system and traffic system
3. Capture video feed from radar camera
4. Loop over each frame in the video feed
a. Detect and track moving vehicles in the frame
b. For each detected vehicle:
i. Calculate the speed based on distance traveled and time elapsed
ii. Check if the calculated speed exceeds the speed limit
iii. If overspeeding, generate a notification report:
- Car plate number
- Location (GPS coordinates or intersection details)
- Date and time of the violation
- Detected speed
Algorithm: Efficient Overspeed Detection
. Start
2. Initialize camera system and traffic system
3. Capture video feed from radar camera
4. Loop over each frame in the video feed
a. Detect and track moving vehicles in the frame
b. For each detected vehicle:
i. Calculate the speed based on distance traveled and time elapsed
ii. Check if the calculated speed exceeds the speed limit
iii. If overspeeding, generate a notification report:
- Car plate number
- Location (GPS coordinates or intersection details)
- Date and time of the violation
- Detected speed
Efficiency Improvements:
Asynchronous report generation: By transmitting notification reports to the traffic system in an asynchronous
manner, you can free up time for the algorithm to process frames without having to wait for the report to be
transmitted.