Professional Documents
Culture Documents
Provide clear explanation for all the diagrams mention below. (Provide assumption if
necessary) (30 marks) (LO2)
Class Diagram
Sequence Diagram
In addition to being the most well-known diagram type among the behavioral UML kinds,
use case diagrams provide a visual representation of the players involved in a system, the
various functions required by those actors, and the way these various functions interact.
It's an excellent beginning point for any project conversation since it allows you to quickly
identify the primary actors engaged as well as the primary processes of the system under
consideration. You can use our tool to build use case diagrams, or you can start right away by
downloading one of our use case templates.
Class Diagram
In any object-oriented solution, class diagrams serve as the fundamental building element.
System classes are represented by the properties and activities of each class, as well as the
relationships between the classes themselves.
In most modeling programs, a class is divided into three sections. The top of the page has the
name, the middle contains the characteristics, and the bottom contains the operations or
methods. Creating class diagrams is useful in large systems with numerous related classes
since it allows for easier grouping of classes. Different types of arrows are used to depict
different types of links between classes.
Sequence Diagram
In UML, sequence diagrams depict how items interact with one another and in what order
they interact. It's worth noting that they only reveal interactions for a specific scenario. The
processes are depicted vertically, with arrows indicating interactions.
Task 2: Develop suitable system for the above scenario based on the design. Required to use
Object Oriented concepts (Object, Class, Abstraction, Inheritance, Encapsulation and
Polymorphism) for the development. Document the main functionalities and Object Oriented
concepts applied with proper explanation and source code.
import java.util.*;
import java.io.*;
System.out.println("\t\t*******************************************");
System.out.println("\t\t*******************************************");
System.out.println("\t\t\t --------------------");
System.out.println("\t\t\t --------------------");
class Employee_Add
emp.getInfo();
try{
if(f1.createNewFile()){
myWriter.write("Employee ID:"+emp.employ_id+"\n"+"Employee
Name :"+emp.name+"\n"+
myWriter.close();
sc.nextLine();
else {
sc.nextLine();
}
catch(Exception e){System.out.println(e);}
class EmployDetail
String name;
String father_name;
String email;
String position;
String employ_id;
String employ_salary;
String employ_contact;
name=sc.nextLine();
father_name=sc.nextLine();
employ_id=sc.nextLine();
email=sc.nextLine();
System.out.print("Enter Employee's Position ----: ");
position=sc.nextLine();
employ_contact=sc.nextLine();
employ_salary=sc.nextLine();
class Employee_Show
while (sc.hasNextLine())
System.out.println(sc.nextLine());
if(file.exists())
if(file.delete());
else
class Employee_Update
String fileContext="";
while (sc.hasNextLine())
fileContext =fileContext+"\n"+sc.nextLine();
fileContext = fileContext.replaceAll(o,n);
myWriter.write(fileContext);
myWriter.close();
class CodeExit
System.out.println("\n*****************************************");
System.out.println("*****************************************");
System.out.println("\t\t/~ <0d3d by Abhinav Dubey\n");
System.exit(0);
class EmployManagementSystem
System.out.print("\033[H\033[2J");
int i=0;
obj1.menu();
while(i<6)
{
System.out.print("\nPlease Enter choice :");
i=Integer.parseInt(sc.nextLine());
switch(i)
case 1:
/** Creating class's object and calling Function using that object **/
ep.createFile();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
case 2:
String s=sc.nextLine();
try
epv.viewFile(s);}
catch(Exception e){System.out.println(e);}
System.out.print("\nPress Enter to Continue...");
sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
case 3:
String s=sc.nextLine();
epr.removeFile(s);
sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
case 4:
String I=sc.nextLine();
try
{
epv.viewFile(I);
catch(Exception e)
System.out.println(e);
System.out.println("If you want to Change the Name, then Enter Current Name
and Press Enter. Then write the new Name then Press Enter. It will Update the Name.\
n");
String s=sc.nextLine();
String n=sc.nextLine();
try
epu.updateFile(I,s,n);
sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
catch(IOException e)
System.out.println(e);
case 5:
obj.out();
}
Task 3: Provide a user manual for the developed solution
# Employee-Management-System
This repository consists of Java Program for Employee Management System. In this
repository I have created a TUI program for Employee Management System which consists
of 4 different operation.<br>
(1) Adding User<br> (2) Removing User<br> (3) Updating User<br> (4) Viewing details of
User
<img src="Images/Java.png">
# How to run ?
For Compliation : <code>javac EmployManagementSystem.java</code>