Employee Online Time Clock Project

$ 25

Employee Online Time Clock Project

Overview
The final project for this course is the creation of an Online Time Clock. The final project is designed to allow you to put together the concepts learned in the course and to demonstrate your ability to write a useful Java program. The final project is given early in the course so that you will have plenty of time to design the program before it is due.
Early in the course, you will not have the knowledge to implement many of the required elements, but you will still be able to move your project forward by designing it at the conceptual level. Diagramming and pseudo coding before coding a project allows you to think through what needs to be done in detail, thus allowing you to see design flaws before they have been coded. The extra effort to design the program before coding will make the coding process much easier and will result in fewer bugs. The project specifications include a list of requirements that demonstrate different areas of Java development that must be included in your final project to demonstrate your skill in that area. The project shall demonstrate the following skills:
• Use of a static member
• Use of extended class
• Code Commenting
• GUI or Console based interface
• Use of public and private methods
• Use at least one overloaded constructor
• Create instances of class(es)
• Use the ‘this’ reference
• Optional: Exception handling using try/throw/catch/finally

The project is divided in to Six Milestones, which will be submitted at various points throughout the course to scaffold learning and ensure quality final submissions. These milestones will be submitted in Modules Four, Six, Seven, Eight, Nine, and Ten.

Main Elements

Approach Blueprint
Coding a project of this size requires some planning and time. Work on building a blueprint for the program throughout the term. Having a blueprint will make the coding simpler and keep you from going down dead ends. Some important things to work on early:
• If the application is using more than one screen (console applications have no choice.), what is the flow between screens? A flow chart that covers all of the possible screen access possibilities will avoid logic problems in the application.
• Break the program down into a set of classes that will work together to execute the program. Object oriented programs are easier to write than structured programs because each class has one set of functionality that it does well and working on one piece at a time makes the programming easier. List out the properties and methods that each class will use so that the relationship between the classes can be established. (Software Engineers create formal class diagrams that show the class hierarchy of a program and how they interrelate. A formal class diagram is not required for this project, but sketching a rough diagram will make things easier.)
• Optional: Error handling can have unexpected results if not done correctly. Diagram how your exception handling will work by sketching a flow chart.
• Validation can be as tricky as error handling, so sketching a diagram is also useful.
• Devise a strategy for handling data. The data may be held in objects in memory, or, optionally, in text files. If you decide to use memory objects, then there should be separate objects for Employee information and their time clock records. The employee memory object (or employee.txt flat file) will be relatively simple since there are no deletes or modifications to an input value. Employees will be employee ID order. The time clock memory object (or timeclock.txt file) is a different story because the records will not be in employee ID order; they will be in the order that an employee punched in or out. When generating a report it will be necessary to find all of the data for each employee and output it in chronological order. The chronological order is already in the memory object (or file) because we are not deleting or modifying any data. The program will only need to group all of the data for an employee together. This can be done in several ways (You may choose which is best, or come up with another solution):
o When an employee punches in or out the program can search the data file and insert the value after the last entry for that employee.
o The system can sort the values in the file in memory as part of the reporting functionality, leaving the data in the file in its original order.

Caution is in order because the records should have the punch in time and punch out time for a single day in order. (They will be in that order in the file, because someone has to punch in before they punch out. The program specifications require checking for a ‘punched in’ record before saving a ‘punched out’ record.)
NOTE: The separate screen descriptions are for console applications. The GUI application may use one or more screens, as appropriate, but the functionality shall remain the same).
NOTE: Functionality labeled as Optional does not have to be implemented. It is for students who would like to write a more challenging program.
NOTE: Those developing a GUI application will replace the ‘input values’ with appropriate GUI objects such as buttons. For example, instead of inputting ‘A’ for Add New Employee, create a button for adding a new employee.

Scenario
A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock. The time clock shall keep a history of an employee’s hours for a two-week pay period. The application shall have the following functionality:

Main Screen
The main screen shall act as a menu to access program functionality and to exit the program.
The main screen shall:
• Display 4 options
A) Add New Employee – Displays new employee screen
B) Punch In/Out – Displays punch in/out screen
C) Report – Displays report screen
D) Exit – Exits the program
• Display an input field called “Choice” to input one of the four options.
• Inputting an incorrect option shall display a prompt indicating that the input was invalid and to try again.
• Optional functionality: If the user enters an incorrect value more than 3 times, display a prompt that the program is exiting and close the program.

Add New Employee Screen
The ‘add new employee screen’ shall:
• Add a new employee (we will not worry about modifying or deleting.), saving the data to a memory object or file.
o The program shall allow the user to enter the Employee’s First and Last Name
o The program shall validate the first and last name entered to ensure they are not blank. (We will assume that everyone has a first and last name.)
o The program shall assign a new employee ID to the employee and display it on the screen.
o The employee ID shall be generated by adding 1 to the largest employee ID already in the employee memory object (or employee.txt data file).
o The program shall allow the user to enter an unlimited number of employees. In console based applications, the system shall prompt “Do you want to enter another? (y/n). Entering ‘y’ shall clear the screen and prompt for another employee. If ‘n’, the program shall return to the main screen.
o The employee data shall be saved to a memory object called employee (or file called employee.txt)
o Optional functionality: Check the first and last name to ensure that there are only valid characters. For examples, filter out numbers, punctuation, etc. Commas can cause problems because the data is being saved to comma-delimited files and that can be a headache!

Punch in/out Screen
The ‘punch in/out screen’ shall:
• Save the punch in or punch out date and time of the employee to a memory object (or file).
o The date and time, ‘I’ for Punched In or ‘O’ for punched out along with the Employee ID shall be saved to a memory object called timeclock (or file called timeclock.txt).
o The recorded date for ‘punched in’ and ‘punched out’ shall be the method for matching corresponding records.
o The program shall test to ensure that there is a ‘Punched in’ record for the corresponding day before a ‘punched out’ record is saved. If none is found, prompt the user to enter a ‘punched in’ time.
o Then the user has punched in or out, the program shall display a message indicating that the employee has punched in or out, the employee ID, date and time.
o In console based applications the screen shall display “Press any key to continue”
o In console based applications the program shall return to the main menu after a key is pressed when the “Press any key to continue” prompt is displayed.
o Optional functionality: Add the day of the week to the data saved.

Report Screen (Hint: If you are writing a console application, java.io.PrintWriter may be useful.)
The ‘report screen’ shall:
• Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.
o The screen shall display a prompt to enter ‘I’ for individual employee report, ‘A’ for all employees report.
o If the selected value is ‘I’, prompt the user to enter the employee’s ID number.
 If ‘I’ is selected the display shall show the employee’s name and ID, list out each day worked in chronological order, the number of hours worked that day and a total number of hours worked in the two week period.
 The report shall prompt the user to re-enter an employee ID of it does not exist in the employee file.
 Optional Functionality: If the user inputs a nonexistent employee ID more than 3 times, prompt the user and then return to the main screen.
o If the selected value is ‘A’, output the information to the console for the past two weeks.
o The end of the report shall display “Press any key to continue” to return to the main menu.
o Optional Functionality: Allow the user to print the report to a printer.

Example Screen Shots
The following screen shots are suggestions for setting up your application. You are not required to make your screens look like these, they are only provided to help you think about the program’s interface. Items that are inside a red box are some example prompts that may not be displayed unless a particular action takes place. You may have more or different prompts depending on how you decide to create your program.
Console Based Application

GUI Base Application Using One Screen (You are free to use multiple screens, if desired.)

81 in stock

SKU: EMPLOYEETIMEJAVA Category:

Description

Employee Online Time Clock Project

Overview
The final project for this course is the creation of an Online Time Clock. The final project is designed to allow you to put together the concepts learned in the course and to demonstrate your ability to write a useful Java program. The final project is given early in the course so that you will have plenty of time to design the program before it is due.
Early in the course, you will not have the knowledge to implement many of the required elements, but you will still be able to move your project forward by designing it at the conceptual level. Diagramming and pseudo coding before coding a project allows you to think through what needs to be done in detail, thus allowing you to see design flaws before they have been coded. The extra effort to design the program before coding will make the coding process much easier and will result in fewer bugs. The project specifications include a list of requirements that demonstrate different areas of Java development that must be included in your final project to demonstrate your skill in that area. The project shall demonstrate the following skills:
• Use of a static member
• Use of extended class
• Code Commenting
• GUI or Console based interface
• Use of public and private methods
• Use at least one overloaded constructor
• Create instances of class(es)
• Use the ‘this’ reference
• Optional: Exception handling using try/throw/catch/finally

The project is divided in to Six Milestones, which will be submitted at various points throughout the course to scaffold learning and ensure quality final submissions. These milestones will be submitted in Modules Four, Six, Seven, Eight, Nine, and Ten.

Main Elements

Approach Blueprint
Coding a project of this size requires some planning and time. Work on building a blueprint for the program throughout the term. Having a blueprint will make the coding simpler and keep you from going down dead ends. Some important things to work on early:
• If the application is using more than one screen (console applications have no choice.), what is the flow between screens? A flow chart that covers all of the possible screen access possibilities will avoid logic problems in the application.
• Break the program down into a set of classes that will work together to execute the program. Object oriented programs are easier to write than structured programs because each class has one set of functionality that it does well and working on one piece at a time makes the programming easier. List out the properties and methods that each class will use so that the relationship between the classes can be established. (Software Engineers create formal class diagrams that show the class hierarchy of a program and how they interrelate. A formal class diagram is not required for this project, but sketching a rough diagram will make things easier.)
• Optional: Error handling can have unexpected results if not done correctly. Diagram how your exception handling will work by sketching a flow chart.
• Validation can be as tricky as error handling, so sketching a diagram is also useful.
• Devise a strategy for handling data. The data may be held in objects in memory, or, optionally, in text files. If you decide to use memory objects, then there should be separate objects for Employee information and their time clock records. The employee memory object (or employee.txt flat file) will be relatively simple since there are no deletes or modifications to an input value. Employees will be employee ID order. The time clock memory object (or timeclock.txt file) is a different story because the records will not be in employee ID order; they will be in the order that an employee punched in or out. When generating a report it will be necessary to find all of the data for each employee and output it in chronological order. The chronological order is already in the memory object (or file) because we are not deleting or modifying any data. The program will only need to group all of the data for an employee together. This can be done in several ways (You may choose which is best, or come up with another solution):
o When an employee punches in or out the program can search the data file and insert the value after the last entry for that employee.
o The system can sort the values in the file in memory as part of the reporting functionality, leaving the data in the file in its original order.

Caution is in order because the records should have the punch in time and punch out time for a single day in order. (They will be in that order in the file, because someone has to punch in before they punch out. The program specifications require checking for a ‘punched in’ record before saving a ‘punched out’ record.)
NOTE: The separate screen descriptions are for console applications. The GUI application may use one or more screens, as appropriate, but the functionality shall remain the same).
NOTE: Functionality labeled as Optional does not have to be implemented. It is for students who would like to write a more challenging program.
NOTE: Those developing a GUI application will replace the ‘input values’ with appropriate GUI objects such as buttons. For example, instead of inputting ‘A’ for Add New Employee, create a button for adding a new employee.

Scenario
A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock. The time clock shall keep a history of an employee’s hours for a two-week pay period. The application shall have the following functionality:

Main Screen
The main screen shall act as a menu to access program functionality and to exit the program.
The main screen shall:
• Display 4 options
A) Add New Employee – Displays new employee screen
B) Punch In/Out – Displays punch in/out screen
C) Report – Displays report screen
D) Exit – Exits the program
• Display an input field called “Choice” to input one of the four options.
• Inputting an incorrect option shall display a prompt indicating that the input was invalid and to try again.
• Optional functionality: If the user enters an incorrect value more than 3 times, display a prompt that the program is exiting and close the program.

Add New Employee Screen
The ‘add new employee screen’ shall:
• Add a new employee (we will not worry about modifying or deleting.), saving the data to a memory object or file.
o The program shall allow the user to enter the Employee’s First and Last Name
o The program shall validate the first and last name entered to ensure they are not blank. (We will assume that everyone has a first and last name.)
o The program shall assign a new employee ID to the employee and display it on the screen.
o The employee ID shall be generated by adding 1 to the largest employee ID already in the employee memory object (or employee.txt data file).
o The program shall allow the user to enter an unlimited number of employees. In console based applications, the system shall prompt “Do you want to enter another? (y/n). Entering ‘y’ shall clear the screen and prompt for another employee. If ‘n’, the program shall return to the main screen.
o The employee data shall be saved to a memory object called employee (or file called employee.txt)
o Optional functionality: Check the first and last name to ensure that there are only valid characters. For examples, filter out numbers, punctuation, etc. Commas can cause problems because the data is being saved to comma-delimited files and that can be a headache!

Punch in/out Screen
The ‘punch in/out screen’ shall:
• Save the punch in or punch out date and time of the employee to a memory object (or file).
o The date and time, ‘I’ for Punched In or ‘O’ for punched out along with the Employee ID shall be saved to a memory object called timeclock (or file called timeclock.txt).
o The recorded date for ‘punched in’ and ‘punched out’ shall be the method for matching corresponding records.
o The program shall test to ensure that there is a ‘Punched in’ record for the corresponding day before a ‘punched out’ record is saved. If none is found, prompt the user to enter a ‘punched in’ time.
o Then the user has punched in or out, the program shall display a message indicating that the employee has punched in or out, the employee ID, date and time.
o In console based applications the screen shall display “Press any key to continue”
o In console based applications the program shall return to the main menu after a key is pressed when the “Press any key to continue” prompt is displayed.
o Optional functionality: Add the day of the week to the data saved.

Report Screen (Hint: If you are writing a console application, java.io.PrintWriter may be useful.)
The ‘report screen’ shall:
• Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.
o The screen shall display a prompt to enter ‘I’ for individual employee report, ‘A’ for all employees report.
o If the selected value is ‘I’, prompt the user to enter the employee’s ID number.
 If ‘I’ is selected the display shall show the employee’s name and ID, list out each day worked in chronological order, the number of hours worked that day and a total number of hours worked in the two week period.
 The report shall prompt the user to re-enter an employee ID of it does not exist in the employee file.
 Optional Functionality: If the user inputs a nonexistent employee ID more than 3 times, prompt the user and then return to the main screen.
o If the selected value is ‘A’, output the information to the console for the past two weeks.
o The end of the report shall display “Press any key to continue” to return to the main menu.
o Optional Functionality: Allow the user to print the report to a printer.

Example Screen Shots
The following screen shots are suggestions for setting up your application. You are not required to make your screens look like these, they are only provided to help you think about the program’s interface. Items that are inside a red box are some example prompts that may not be displayed unless a particular action takes place. You may have more or different prompts depending on how you decide to create your program.
Console Based Application

GUI Base Application Using One Screen (You are free to use multiple screens, if desired.)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.