You are on page 1of 2

Programming Exercise J2SE 1.

5 Fundamentals of Java Programming


Max Marks: 10 Convener: Pankaj Chadha Important Instructions This Programming Exercise contains a total of 2 questions. All questions are mandatory. Each question carries 5 marks. Java is case-sensitive language, so be careful. You should also follow all the naming conventions for identifiers and use proper indentation. Students need to score minimum 50% marks to pass this exercise. Max Time: 1/2 Hr.

Question 1) Create classes named Car and CarTest with following specifications given below in class diagrams

Both classes are present in Source-File Named :

CarTest.java

The main method of class CarTest should create an instance of class Car and then should call both setter methods with any appropriate user-specified arguments. Using the instance specified earlier the main method should also call both the getter methods to display the result on standard output.

Question 2) Create a class named Test containing main method which displays on standard output two strings Hello and World on single line separated by space, using System.out.print method. Test class should be present inside package org.testing

!! End of Programming Exercise !!

You might also like