Professional Documents
Culture Documents
1st Theory Assignment
1st Theory Assignment
Assignment# 1
=========================================
[Assignment 1 - is related to CLO # 2 and 3]
CLO-2: Design programs utilizing the principles of object oriented to solve simple computational
problems.
CLO-3: “Implement object-oriented principles to effectively and efficiently solve computational
problems involving multiple objects”.
Design and implement java program for " Covenant System"; the system stores a
covenant name, type and date for each object. Also, each Covenant should have the
employee name and ID. The system contains a Covenant class and TestCovenant
class. To implement the class, you must: (not exclusively)
1. Make at least one constructor to initialize the object with a Date object and ID.
2. Each private data must have setter and getter method.
3. In the main class you have to create 5 Covenants objects and assign for each
object its (name, id, datecreated, Employee name, Employee ID).
- Submit UML class diagram for the Covenants class with Java codes and
screenshot of the output (all in one .docx or PDF file).
- If there is any copy and paste; the assignment's grade will be 0(zero).
- If the assignment is submitted late; two marks will be deducted.
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Higher Education
Najran University
وزارة التعليم العالي
Faculty of Computer Science and
جامعة نجران
Information Systems
كلية علوم الحاسب ونظم المعلومات
Covenant.java
public class Covenant {
return this.covenantName;
}
return this.covenantType;
}
return this.covenantDate;
}
return this.employeeName;
}
return this.employeeID;
}
TestCovenant.java
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Higher Education
Najran University
وزارة التعليم العالي
Faculty of Computer Science and
جامعة نجران
Information Systems
كلية علوم الحاسب ونظم المعلومات
OUTPUT
UML
Covenant
+Covenant(String covenantName, String covenantType, String covenantDate,
String employeeName, String employeeID)
-String: covenantName
-String: covenantType
-String: covenantDate
-String: employeeName
-String: employeeID
+getCovenantName():String
+getCovenantType ():String
+getCovenantDate ():String
+getEmployeeName ():String
+getEmployeeID():String
+setCovenantName(String s):void
+setCovenantType(String s):void
+setCovenantDate (String s):void
+setEmployeeName (String s):void
+setEmployeeID (String s):void
+pritInfo():void