OODJ Test 2 Questions
OODJ Test 2 Questions
Question 1
Develop a class diagram identifying the attributes, methods and cardinalities for the
following scenario:
(Total: 10 marks)
This study source was downloaded by 100000827704856 from CourseHero.com on 07-08-2022 20:26:30 GMT -05:00
https://www.coursehero.com/file/38269267/OODJ-Test-2-Questionsdoc/
Object-oriented Development with Java (CT038-3-2) Page 2 of 4
Question 2
Observe the classes given below:
class Vehicle
{
public void a()
{
System.out.println("Vehicle a");
}
public void b()
{
System.out.println("Vehicle b");
}
}
This study source was downloaded by 100000827704856 from CourseHero.com on 07-08-2022 20:26:30 GMT -05:00
https://www.coursehero.com/file/38269267/OODJ-Test-2-Questionsdoc/
Object-oriented Development with Java (CT038-3-2) Page 3 of 4
Given the classes above (Page 2), what output is produced by the following code?
(Total: 10 marks)
This study source was downloaded by 100000827704856 from CourseHero.com on 07-08-2022 20:26:30 GMT -05:00
https://www.coursehero.com/file/38269267/OODJ-Test-2-Questionsdoc/
Object-oriented Development with Java (CT038-3-2) Page 4 of 4
Question 3
Given the following Java code, fill the missing gaps with the appropriate keyword/
command/value:
package filesdemo;
import java.io.*;
(5 marks)
<<END OF PAPER>>
This study source was downloaded by 100000827704856 from CourseHero.com on 07-08-2022 20:26:30 GMT -05:00
https://www.coursehero.com/file/38269267/OODJ-Test-2-Questionsdoc/
Powered by TCPDF (www.tcpdf.org)