Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

create an employee time clock in java using netbeans

The timeclock needs to have a Main Screen that displays 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.

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 When 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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91674374
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Suppose a lawn care company can install either mulch or

Suppose a lawn care company can install either mulch or pine straw for flowerbeds of their residential customers. A workday typically runs 12.5 hours (or 750 minutes) and the company can install mulch in 30 minutes and p ...

Suppose pointers are 4 bytes long and keys are 12 bytes

Suppose pointers are 4 bytes long, and keys are 12 bytes long. How many keys and pointers will a block of 16,384 bytes have?

Can someone please help me with this examthis is consists

can someone please help me with this exam This is consists of four questions. The questions are designed to test your understanding of certain concepts that were studied over the course of the semester. Please answer all ...

Question suppose we have two binary search trees b1 and b2

Question : Suppose we have two binary search trees B 1 and B 2 Give an algorithm to merge B 1 and B 2 into a single binary search tree, and runs in time linear in the sum of the sizes of the two trees. Give good justific ...

Suppose users share a 2 mbps link also suppose each user

Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. When a circuit switching is used, how many users can be s ...

Suppose that in responding to interrupts from io devicea

Suppose that in responding to interrupts from I/O deviceA the processor consumes 1000 cycles to perform the context switch required to transfer control to the interrupt handler. The interrupt handler takes an additional ...

Research web server vulnerabilities by choosing a site and

Research web server vulnerabilities by choosing a site and determining what kind of platform it is running on. Do not scan the server, you can use a site such as Netcraft to determine what the website is running. See if ...

Question you work for a medium-sized it firm and your boss

Question: You work for a medium-sized IT firm and your boss mentions that recently a number of employees have received calls from individuals who didn't identify themselves and asked a lot of questions about the company ...

Question resource security planning and risk management

Question: Resource: Security Planning and Risk Management Template The CIO of the organization you chose is ready for you to take a look at the organization's potential vulnerabilities and threats. Complete the 1.5- to 2 ...

Determine the number of moles of oleic acid in the

Determine the number of moles of oleic acid in the monolayer. Assume the nubmer of grams of oleic acid in the monolayer is  7.12×10 -6  g MW for oleic acid is 282 g/mol.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As