Reference no: EM133010235
Assessment - Database, Multithreading and Networking
Task 1: Tax Management Database Application
Write a Java GUI program that will calculate tax for an employee ID and will store the tax information in a table called "TaxResult" of a MySQL database called "TaxManagementSystem". The fields of the TaxResult table is ID (primary key and data type varchar), Financial Year (data type varchar), Taxable Income (data type double), and Tax (data type double).
The taxrates.txt file contains the tax rates which will be uploaded in the subject interact site. The program needs to read the taxrates.txt file and store the tax information in a proper data structure so that it can be easily used in tax calculation. The format of the taxrates.txt file is as follows:
Taxable Income Tax on Income
0 - $18,200 0
$18,201 - $45,000 9c for each $1 over $18,200
$45,001 - $120,000 $5,092 plus 32.5 cents for each $1 over $45,000
$120,001 - $180,000 $29,467 plus 37 cents for each $1 over $120,000
$180,001 and over $51,667 plus 45 cents for each $1 over $180,000
The GUI of the application is shown below. The GUI will be asking for three input values namely ID, Financial Year and Taxable Income.
When a user clicks on the "Calculate" button then tax will be calculated on the given taxable income and will be shown in the GUI as shown below and the ID, Financial Year, Taxable Income, and Tax will be stored in the TaxResult of the TaxManagementSystem database. Note that, if an ID already exists in the table then display a warning/appropriate message in the GUI. If the taxable income or financial year is null then GUI should display a warning/appropriate message.
Moreover, the application will have search, update and delete options as shown in the above GUI.
Search Operation: Using ID, a user can search for tax information for that ID. If the ID does not exist in the table then display an appropriate message in the GUI.
Update Operation: Using ID, the financial year and taxable income for that ID can be updated. If the ID does not exist in the table then display an appropriate message in the GUI.
Delete Operation: Using ID, the record for that ID can be deleted. If the ID does not exist in the table then display an appropriate message in the GUI.
Marks distribution:
Functionality
Presentation: Report with enough screen shots is submitted. The discussion on each screen shot is easy to read and understand.
Task 2: Multi-threaded Animation
The program described in listing 20.5 of your textbook displays bouncing balls as shown below:
Modify this program so that
• it uses a thread to animate the bouncing ball movements
• users can increase and decrease the speed of the ball by using a slider
• Suspend, Resume, Add Ball and Remove Ball buttons work
Marks distribution:
Functionality
Presentation: Report with enough screen shots is submitted. The discussion on each screen shot is easy to read and understand.
Task 3: Client Server Loan Processing Application
Write a JAVA GUI program for a server and multiple clients. A client sends loan information (annual interest rate, number of years, and loan amount) to the server. The server then calculates monthly payment and total payment, and sends them back to the client. Note that, the loan information of a client should not be available to other clients. You need to use java networking concepts to implement this task.
Attachment:- Multithreading and Networking.rar