0% found this document useful (0 votes)
20 views

OOP Assignment

The document outlines an OOP assignment with instructions for students to solve questions from two parts. Part A consists of short questions on concepts like encapsulation, inheritance, and access modifiers in Java, while Part B involves converting UML diagrams into Java code and designing programs based on given scenarios. Specific requirements are provided for students based on their course type, either Lab or Theory.
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)
20 views

OOP Assignment

The document outlines an OOP assignment with instructions for students to solve questions from two parts. Part A consists of short questions on concepts like encapsulation, inheritance, and access modifiers in Java, while Part B involves converting UML diagrams into Java code and designing programs based on given scenarios. Specific requirements are provided for students based on their course type, either Lab or Theory.
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/ 3

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

Part – A: Short Question

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.

Part – B: UML and Code

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]

Enter Name of the Writer: Muhammed Zafar Iqbal

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

You might also like