Comp3111_Lab2_WS_F2024
Comp3111_Lab2_WS_F2024
Objectives
Pre-requisite Reading:
The COMP3111 course assumes you will have basic programming experience (from COMP2011/2012 or 2012H), however, you
might not have Java experience. If that is the case before starting on this lab, please read the course material (available in Canvas:
Lab 2):
• PPT Slides: COMP3021 Topic 1: Introduction to Java Programming
Now we are going to demonstrate the construction of OOP programming with two Java Classes:
• [Score.java] – A library to build the object-oriented Java classes.
• [mainApp2a.java] – An application main program to call the object-oriented Java class(es).
Step 3.2 Lab 2 Add Interface - Assignment Part 2 – Fix the problem on inheritance
LAB ASSIGNMENT:
Part 1: Complete Exercise 2, Step 2.1 – Fill in the missing code in [Book] Java class.
Part 2: Complete Exercise 3, Step 3.2 – Figure out the problem on line 25 of [mainApp2c] class & fix the bugs (modify
[MobileComputer] Java class). Write your explanation how you fixed the problem.
Copy your final code of Part 1: [Book.java] and Park 2: [MobileComputer.java] and your explanation statement of Park 2 into one
text file. Add a heading with your student ID and name on the document. Save the text file as [Lab2Assignment.pdf] and submit
on Canvas before Lab2 due date.
Assessment:
1. 0 mark for no submission on Part 1; +0.5 mark for incorrect code; +1.0 mark for correct code.
2. 0 mark for no submission on Part 2; +0.5 mark for problem fixed; +0.5 mark for correct explanation.