Question

In: Computer Science

Programming language= In Java and Oracle Sql You are required to develop a simple HR application...

Programming language= In Java and Oracle Sql

You are required to develop a simple HR application for a small accounting firm that wishes
to keep track of all the employees at the firm; storing details about their salary, phone numbers
and Date of Birth. The firm has many departments and there are 5 to 20 employees in each
department. The department information includes department name, description and total
number of employees in that department. The company also provides vehicles for some of its
employees. An employee maybe allocated one car. To ensure timely maintenance of vehicle,
the company would like to store the following details of the vehicle: make, model,
next_maintenance_date.
Each employee has a position (manager, accountant, administrator, clerk, etc.). Various
allowances are allocated to each position. For example, the managers have fuel allowance,
house allowance, social allowance and managers allowance. On the other hand, the
administrators have house allowance and social allowance. Clerks have social allowance and
uniform allowance. The name and description of each allowance needs to be stored.
The HR system keeps track of all Projects in the organization. Each department is assigned to
one or more project. Project can be assigned to one or more department (Interdisciplinary
projects).
Each HR Employee has his own credentials to login into the system to manipulate the database.
The HR credentials are stored in a table (Login). You will also need a table to store transactions
(Transaction Date/Time and User Name).
The system must store employees’ grades. Each employee will have a grade (Example A, B,
C). The grade should have a predefined salary range.
You need to have the following constraints in your system: The employee’s salary should be
between the grade range (Example: Grade A - Salary between 30000-50000). Employee’s
phone number and Date of Birth should not be empty. Vehicle next maintenance is within 6
month of current date. Each position should not exceed the predefined allowances.

Part A:
Include the following before drawing the ERD:
a. Write the business rules.
b. Identify all Entities and attributes
c. Identify Primary key and Foreign Key in each table/Entity
d. Identify the Relationships between Entities.
e. Resolve any M:N relationship between the entities.
Part B:
Draw the ERD using any Data Modelling Software.
Part C:
Create the SQL script to create tables and insert at least five record in each table.
Part D:
The System must provide the following functionalities:
1- Login Screen with a Username and Password for HR Employees only. Username and
password must be retrieved from a table.
2- Add a new Employee.
3- Remove (Drop) an Employee. Retrieve employee by ID and then perform transaction.
4- Update employee’s salary.
5- Calculate the total amount of allowances. Need to enter Employee ID to retrieve data.
6- The system must fire a SQL trigger whenever adding a new employee. The trigger
must store the following information (Date/Time transaction and the Username)
7- The System must provide the following reports:
7-1- Employee History (Include: Employee Name, Department Name, Position).
7-2- Vehicle History (Include: Employee Name, Vehicle Model).
7-3- List Employee’s allowances. Need to enter Employee ID to retrieve data.
Part E:
Create the Screens using Java Swing Windows Builder
Grading:
Task Percentage
Develop ERD 30%
SQL Script 10%
1 10%
2,3,4,5 20%
6,7 20%
GUI 10%
Important:
1. Submitting Due Date: 25th of April 2020.
2. The grade for the project is 10 points distributed as follows:
2.1 Project (ERD + SQL Script (Schema) + Java Application source code + Report)
(80%)
2.2 Discussion and project demo (20%):
3. Copying and/or plagiarism (-100%)
4. Program does not compile (-50%)
5. In case of late submission, (-10%) for each day of delay.
6. No Teamwork effort (-20).
7. Each group can have two to three students.
8. Include all work in one ZIP file (Student1_Student2_Student3.zip)

Solutions

Expert Solution

Part A:

  1. Business Rules: The given system will have below rules:

Rule #1: Department will have minimum 5 to maximum 20 employees

Rule #2: Employees will have unique Emp_ID

Rule #3: Some employees of HR_Employee type will have username and password.

Rule #4: Car can be assigned to one or none employee.

Rule #5: Employee can have 0 or one car.

Rule #6: Multiple allowances will be given to multiple employees

Rule #7: Multiple departments will handle multiple projects.

Rule #8: A project can be assigned to multiple departments.

Rule #9: An employee will has assigned Grade.

Rule #10: Transactions will be stored for HR_Employees

  1. Entities and attributes:
  • Department(Department_Name, Description , Total_Employees)
  • Employees(Emp_ID, salary, Phone_numbers, DateofBirth, Position, Department_Name)
  • HR_Employee(username, password); it is a sub-entity of the entity Employee
  • Car(Car_ID, Make, Model,Next_maintenance_date, Emp_ID)
  • Allowance(Name, Description, Amount )
  • Project(Project_ID, Name)
  • Transaction(Transaction_ID, DateTime, Username)
  • Grade(Grade_Name, Min_Salary, Max_Salary)
  1. Primary key and Foreign keys of tables/entities:
  • Department:
    • Primary key: Department_Name
  • Employees:
    • Primary key: Emp_ID
    • Foreign key: Department_Name
  • Car:
    • Primary key: Car_ID
    • Foreign key: Emp_ID
  • Allowance:
    • Primary key: Name
  • Project:
    • Primary key: Project_ID
  • Transaction:
    • Transaction_ID
    • Foreign key: Username
  • Grade:
    • Primary key: Grade_Name
  1. Relationship between entities:
  • Department to Employee: A department can have minimum 5 to maximum 20 employees. It is a 1:M relationship.
  • Employee to Car: A Car is assigned to 1 employee whereas an employee can have 0 or 1 car. It is a 1:1 relationship.
  • Employee to Allowance: An employee can have one or more allowance whereas an allowance can be allocated to one or more employees. It is a M:N relationship.
  • HR_Employee to Transation: An HR employee can have one or many transactions whereas a transaction deals with one employee record. It is a 1:M relationship.
  • Project to Department: A department can have many projects similarly a project can be assigned to many departments. It is a M:N relationship.
  • Employee to Grade: Each employee will have one Grade whereas many employees can have same grade. It is a M:1 relationship.
  1. Resolving M:N relationship:

The listed relationships under d) has below relationships of M:N cardinalities:

  • Employee to Allowance: The same needs to be stored in separate entity to resolve the M:N relationship. Please find below entity/table to store the allowances for employees:

Emp_Allowance(Emp_ID, Allowance_Name)

Primary key: (Emp_ID, Allowance_Name)

Foreign key: Emp_ID from Employee

Allowance_Name from Allowance

  • Project to Department: The same needs to be stored in separate entity to resolve the M:N relationship. Please find below entity/table to store the departments and corresponding projects:

Department_Projects(Department_name, Project_ID, start_date, end_date)

Primary key(Department_name , Project_ID)

Department_name foreign key from Department

project_ID foreign key from Project


Related Solutions

Java programming language Write a Java application that simulates a test. The test contains at least...
Java programming language Write a Java application that simulates a test. The test contains at least five questions. Each question should be a multiple-choice question with 4 options. Design a QuestionBank class. Use programmer-defined methods to implement your solution. For example: - create a method to simulate the questions – simulateQuestion - create a method to check the answer – checkAnswer - create a method to display a random message for the user – generateMessage - create a method to...
It is required to develop an application in Java to perform some operations of a bank....
It is required to develop an application in Java to perform some operations of a bank. The application will have the following classes: Class called Person having following data fields (private): firstName (String), lastName(String), gender(char), cpr(long), mobile(String) and following methods: Constructor having 5 parameters to initialize all data fields, Set and get methods for all data fields, toString method to return String equivalent of all data fields, Abstract class called Account having following data fields(protected): accountHolder(Person), ccountNum(long), balance(double)and following methods:...
In JAVA Language Please! Programming Exercise 3.20 required you to design a PID manager that allocated...
In JAVA Language Please! Programming Exercise 3.20 required you to design a PID manager that allocated a unique process identifier to each process. Exercise 4.20 required you to modify your solution to Exercise 3.20 by writing a program that created a number of threads that requested and released process identifiers. Now modify your solution to Exercise 4.20 by ensuring that the data structure used to represent the availability of process identifiers is safe from race conditions. Use Pthreads mutex locks....
PROGRAMMING LANGUAGE : JAVA Problem specification. In this assignment, you will create a simulation for a...
PROGRAMMING LANGUAGE : JAVA Problem specification. In this assignment, you will create a simulation for a CPU scheduler. The number of CPU’s and the list of processes and their info will be read from a text file. The output, of your simulator will display the execution of the processes on the different available CPU’s. The simulator should also display: -   The given info of each process -   CPU utilization - The average wait time - Turnaround time for each process...
Programming Language: JAVA In this assignment you will be sorting an array of numbers using the...
Programming Language: JAVA In this assignment you will be sorting an array of numbers using the bubble sort algorithm. You must be able to sort both integers and doubles, and to do this you must overload a method. Bubble sort work by repeatedly going over the array, and when 2 numbers are found to be out of order, you swap those two numbers. This can be done by looping until there are no more swaps being made, or using a...
C++ Programming Enum - Structure - Array You are asked to develop software for HR department...
C++ Programming Enum - Structure - Array You are asked to develop software for HR department to calculate employee’s weekly salary. The program should contain the following information about a student by declaring a struct: Name (string of characters)        Employee ID (string of characters)        Level (ENGINEER, MANGER, DIRECTOR)        Hourly Rate (floating-point number)        Working Hours (floating-point number)        Weekly Salary (floating-point number) Your program will read an employee data and print the information of employee’s Name, Employee...
Create a project plan on the game or application you are creating. Using java programming. The...
Create a project plan on the game or application you are creating. Using java programming. The project plan should include the following: A description of the game or application The IDE or game engine your plan to use to create the game or app and information on how you are going to develop the game or app If you choose to create a game, how are you going to approach the game design and game development process or if you...
Answer the following in Java programming language Create a Java Program that will import a file...
Answer the following in Java programming language Create a Java Program that will import a file of contacts (contacts.txt) into a database (Just their first name and 10-digit phone number). The database should use the following class to represent each entry: public class contact {    String firstName;    String phoneNum; } Furthermore, your program should have two classes. (1) DatabaseDirectory.java:    This class should declare ArrayList as a private datafield to store objects into the database (theDatabase) with the...
Java Programming In this assignment we are going to create our own programming language, and process...
Java Programming In this assignment we are going to create our own programming language, and process it Java. programming language has 6 commands enter add subtract multiply divide return enter, add, subtract, multiply, divide all take 1 parameter (a double value). return takes no parameters.
In Java Develop, test, and execute a graphics application for simulations using Java. Create a Java...
In Java Develop, test, and execute a graphics application for simulations using Java. Create a Java application. Given a set of events, choose the resulting programming actions. Understand the principles behind Java. Understand the basic principles of object-oriented programming including classes and inheritance. Deliverables .java files as requested below. Requirements Create all the panels. Create the navigation between them. Start navigation via the intro screen. The user makes a confirmation to enter the main panel. The user goes to the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT