University OOP Assignment: Implementing Methods and Attributes

Verified

Added on  2022/08/12

|7
|327
|30
Practical Assignment
AI Summary
This assignment provides a comprehensive solution to an object-oriented programming (OOP) problem. The solution covers key OOP concepts such as classes, inheritance, and methods. The assignment includes detailed explanations and code examples, demonstrating how to implement these concepts in a practical context. The solution includes UML diagrams and code snippets with outputs to visualize the implementation of classes, inheritance, and polymorphism. The assignment also explores attributes and the relationships between classes. The student has provided a detailed breakdown of the code, the outputs, and the application of OOP principles to solve the given problem. This assignment is a valuable resource for students studying OOP, offering a practical understanding of the subject matter.
Document Page
Running head: OBJECT ORIENTED PROGRAMMING
OBJECT ORIENTED PROGRAMMING
Enter name of the Student:
Enter name of the University:
Author note:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1OBJECT ORIENTED PROGRAMMING
Question 1
i) Classes:
Four classes are present that are User, ProductOwner, ScrumMaster and
TeamMember.
I) Abstract class:
ProductOwner, ScrumMaster and TeamMember are abstract classes.
II) Super class:
User is super class of respective three sub classes.
III) Sub class:
ProductOwner, ScrumMaster and TeamMember are sub classes of super class User.
ii) Inheritance:
ProductOwner, ScrumMaster and TeamMember inherit the AccessPrivilege() method
from the super class User.
iii) Attributes:
The attributes are:
a) id and phone with integer data type.
b) login, password, name, email and address with String data type.
iv) Methods:
AccessPrivilege(), CreateProject() and DeleteProject() are methods in this UML.
v) Relationships:
Document Page
2OBJECT ORIENTED PROGRAMMING
Generalization is used in this UML diagram.
Question 2
Figure 1: Source code for Question 2
(Source: Created by author)
Figure 2: Output for Question 2
(Source: Created by author)
Document Page
3OBJECT ORIENTED PROGRAMMING
Question 3
a)
Figure 3: Source code for Question 3a
(Source: Created by author)
Figure 4: Output for Question 3a
(Source: Created by author)
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4OBJECT ORIENTED PROGRAMMING
b)
Figure 5: Source code for Question 3b
(Source: Created by author)
Figure 6: Output for Question 3b
(Source: Created by author)
Document Page
5OBJECT ORIENTED PROGRAMMING
Question 4
Figure 7: Source code for Question 4
(Source: Created by author)
Figure 8: Output for Question 4
(Source: Created by author)
Document Page
6OBJECT ORIENTED PROGRAMMING
Figure 8: Output for Question 4
(Source: Created by author)
chevron_up_icon
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]