0% found this document useful (0 votes)
30 views4 pages

Attachment 1 26

The document outlines the formative assessment for the Systems Development 2 course for the academic year 2025, detailing the assessment structure, due date, and learning outcomes. It includes three compulsory questions focusing on object-oriented programming concepts, inheritance, exception handling, and file management in Java. The assessment is to be submitted as a single PDF file, with specific instructions regarding plagiarism checks and grading penalties for similarity scores exceeding 30%.

Uploaded by

Hanzy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

Attachment 1 26

The document outlines the formative assessment for the Systems Development 2 course for the academic year 2025, detailing the assessment structure, due date, and learning outcomes. It includes three compulsory questions focusing on object-oriented programming concepts, inheritance, exception handling, and file management in Java. The assessment is to be submitted as a single PDF file, with specific instructions regarding plagiarism checks and grading penalties for similarity scores exceeding 30%.

Uploaded by

Hanzy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HIGHER EDUCATION PROGRAMMES

Academic Year 2025: January - June

Formative Assessment 1: Systems Development 2 (HSYD201-1)

NQF Level, Credits: 6, 40

Weighting: 25%

Assessment Type: Essay questions/Practical

Educator: Odwa Dyantyi

Examiner: Odwa Dyantyi

Due Date: 27 March 2025

Total: 100 marks

Instructions:

• This formative assessment consists of THREE Questions.


• The assessment is based on units 1 – 3 (Chapters 9 – 11 of the Java Programming Textbook).
• All questions are compulsory.
• Submit a single PDF file with a cover page containing your details and ALL your answers.
• A Copyleaks Report will be issued via ColCampus once the assignment is submitted. Please
ensure that you follow the correct steps when uploading your assignment, to ensure that the
Copyleaks Report is correctly issued. If the incorrect document is uploaded, or if no Copyleaks
Report is issued, a mark of zero (0) will be awarded. If the Copyleaks Report indicates that a
30% similarity/plagiarism score has been exceeded, 25% of the assessment total will be
deducted from the final grade.

1 HSYD201-1-Jan-Jun2025-FA1-OD-V2-08012025
The assessment covers the following learning outcomes:

• Describe object-oriented inheritance.


• Define base class, superclass, and parent class.
• Derive a subclass from an existing class (Extend classes).
• Use base class and derived class methods with a derived class object.
• Call constructors during inheritance.
• Access superclass methods.
• Employ information hiding.
• Describe exceptions.
• Try code and catch exceptions.
• Use the Path and Files classes.
• Describe file organisation, streams, and buffers.
• Write records to a random-access data file.
• Read records from a random-access data file.

Question 1 [ 23 marks]

1.1 Describe the concept of object-oriented inheritance. (4 marks)

1.2 Describe how a subclass is derived from a base class. Provide a basic example to illustrate your
answer. (5 marks)

1.3 Explain how constructors are called during inheritance. Why is it important to call the
constructor of a superclass in a subclass? (4 marks)

1.4 Explain how methods from both base and derived classes are used with a derived class
object. Provide a code snippet to illustrate. (10 marks)

2 HSYD201-1-Jan-Jun2025-FA1-OD-V2-08012025
Question 2 [56 marks]

2.1 What is information hiding in object-oriented programming? Why is it important in the context
of inheritance? (4 marks)

2.2 Describe exceptions and explain the use of “try and catch” blocks in handling exceptions in
Java. Provide a scenario where exception handling is necessary. (4 marks)

2.3 Write a Java program that demonstrates inheritance.

2.3.1 Define a superclass Vehicle with the attributes make, model, and a method displayDetails().
(14 marks)

2.3.2 Define a subclass Car that extends Vehicle, adds a new attribute numberOfDoors, and
overrides the displayDetails() method to include the new attribute. (14 marks)

2.3.3 In the main method, create an object of the subclass and demonstrate how to call both the
base class and derived class methods. (8 marks)

2.4 Write a Java method that accepts two integers as parameters and returns the result of dividing
them. Implement exception handling to catch and handle division by zero. (12 marks)

Question 3 [21 marks]

A small educational institution wants to implement a simple Java-based system to manage student
records. The system should be able to handle two main functionalities:

- Store student information (Student ID and Student Name) in a file.


- Efficiently update and retrieve student records from the file when needed.

As the developer, you are tasked with building this system. Use the scenario below to answer the
following questions.

3.1 The system needs to create and manage student records using a text file. Explain the role of
the Path and Files classes in Java for file handling. Compare the use of random-access files and
sequential files, outlining when it would be more efficient to use each. (7 marks)

3 HSYD201-1-Jan-Jun2025-FA1-OD-V2-08012025
3.2 Write a Java program that creates a file named studentRecords.txt and writes the header
"Student ID, Student Name" followed by sample student records using a buffered stream. Then,
extend the program to read and display the contents of this file on the console. (7 marks)

3.3 To make the system more efficient for updating and retrieving student records, you decide to
implement random-access file handling. Write a Java program that creates a random-access file,
writes a student record (Student ID and Name) to it, and then retrieves and displays the record from
the file. (7 marks)

4 HSYD201-1-Jan-Jun2025-FA1-OD-V2-08012025

You might also like