Click here to Skip to main content
14,877,303 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
You have been assigned to develop and design a Java Swing Application (Graphical User Interface) to generate the monthly pay slips of a company called Evolution Middle East LLC in Muscat in the Sultanate of Oman. The system would accept the ID of the employee, the name of the employee and his gross salary. The input fields must be validated as necessary. Based on the gross salary provided, if it is equal to or greater than OMR 1500, the system should apply a tax rate of 6% when calculating the income tax otherwise a tax rate of 0% should be applied when calculating the income tax. As shown in the GUI below, the results of calculations such as tax rate, income tax and net salary should be shown. To start the calculations, the button Determine Pay Slip should be used and the button Reset should be used to clear all fields so that the next employee details can be entered. To close the application, the button Close should be used.


Task 2.1 Using NetBeans Design and implement the application described above using GUI components (Java Swing and Event Handling). :

The company name should be in the frame header (the main container)
Appropriate use of components such as labels, panels, fields and buttons to represent the interface as per the given requirements
You are expected to use your own design layout, style and color scheme
Add trigger events for the different buttons to generate and display the pay slip:
a. Determine Pay Slip - determine the tax rate, calculate the income tax and the net salary, and then display them in their appropriate fields with explanations of the methods involved.

b.Reset – remove all existing contents from the fields with explanations of the methods involved.

c.Close – close the application with explanations of the methods involved.

Appropriate use of a layout manager for the different containers Note: You must use proper naming convention for the Java code and you need to briefly elaborate keywords, concept, and logic in your own words.
Task 2.2. Using the same scenario, implement (in Java) a console application for writing data to a sequential text file with a formatter class in Java. :

Implement createFile() method – To open/create a new file named as ‘mec.txt’ with explanations of the methods involved.
Implement writeRecord() method – User enter the employee name, employee id, gross salary, tax rate, income tax and net salary from the keyboard and write/add these values to the file ‘mec.txt’ with explanations of the methods involved. The input fields must be validated as necessary.
Implement closeFile() method – Close the file with explanations of the methods involved. Note: You must use proper naming convention for the Java code and you need to briefly elaborate keywords, concept, and logic in your own words.


What I have tried:

I did not know how to start the solution and I am answering each task separately.
Posted
Updated 12-Apr-21 22:12pm

We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900