OOP Assignment
OOP Assignment
Instructions
1. Solve any 3 questions from Part - A
2. Solve any 2 questions from Part - B
3. Students who have only Lab: Solve Total 4 Problems
4. Students who have only Theory: Solve Total 3 Problems
1. Explain the basic concepts and advantage of the following terms with examples
• Encapsulation
• Inheritance
• Polymorphism
• Encapsulation
2. Write in brief about Access Modifiers in Java.
3. What is the difference between static, final and finally Keywords?
4. Multiple Inheritance is not supported in JAVA- explain why? When it is possible?
5. What is the basic concept of Association, aggregation and Composition? Show with example.
1. Convert the following UML into Java Code. Make necessary changes if needed.
Page 1 of 3
2. Suppose you are going to open a new department in your University. You want to assign some
teachers and enroll some students there.
Now Design the Java Program according to the following UML.
3. Consider the Following UML. Now Convert the UML into JAVA code.
a. Create ArrayList of Mobile.
b. Add Information of N number of Mobile
c. Display their Information from ArrayList
d. You can Search any mobile by its name.
e. You can edit/Delete information of any mobile.
Mobile
-model: String
-price: double
+Mobile(String, double)
+display(ArrayList): void
+search(ArrayList):void
+main(String[] ) : void
Page 2 of 3
4. Design a UML and write the JAVA code to get the following Output.
[Hints: When a user search by any Author’s Name, he can see the following information]
Sample Output:
Writer Information:
Full Name: Muhammed Zafar Iqbal
Born: December 23, 1952
Address: Sylhet, Bangladesh
Fields of Writing:
1. Liberation War
2. Science Fiction
3. Nobel
4. Children's literature
5. Math and Science
6. Newspaper Column
Books:
Book Name Category Publish Year
Amar Bondhu Rasherd Liberation War 1998
Project Nebula` Science Fiction 2003
Ami Topu Children 2005
Page 3 of 3