Question: how to write this whole program using NetBeans program: Sharaf DG is one of the leading Laptop dealers in Sultanate of Oman. You have been
how to write this whole program using NetBeans program:
Sharaf DG is one of the leading Laptop dealers in Sultanate of Oman. You have been asked to develop an
interactive system NonGraphical User Interface for the Sharaf DG to calculate the monthly commission.
The sales unit of Sharaf DG has decided to intensify its efforts to sell its most affordable laptop brand,
priced at OMR. To ensure the entire sales team is exerting the necessary effort, the sales unit has
introduced a commissionbased reward system to recognize topperforming sales employees monthly. To
streamline the implementation of this commission system, the sales unit has requested an application
that can automatically calculate the monthly commissions.
IN SEMESTER INDIVIDUAL ASSIGNMENT
Module Code: COMP Module Name: Advanced Programming
Level: Max. Marks:
Advanced Programming COMP FALL CWASSMGT All QP
MECAMOTEM Page of
Based on the sales profit calculated by multiplying the number of items sold by the unit price the
program will apply the appropriate charge rate to determine the commission and then display the result.
The commission should be calculated using the following criteria:
If the sales profit exceeds the commission is calculated using Charge Rate which is
If the sales profit is more than the commission is calculated using Charge Rate which is
Otherwise use charge rate which is
Note that charge rate charge rate and charge rate are stored in a database.
On the client side, allow the user to enter the Sales Representative ID and number of Laptops sold. The
client will then forward the number of Laptops sold to the server.
Upon receiving the number of Laptops sold from the client, the server will calculate the sales profit of
that Sales Representative and then determine which charge rate to use to calculate the commission.
Then the server will calculate the commission and return to the client the sales profit, the commission
rate used, and the commission value calculated.
Develop an application using multithreading, clientserver, networking, database and utility class concepts
as specify below
Task Database
Create a small database with a table having the fields: Charge Code and Charge Rate to hold the charge
rates given above. Use appropriate data type and field properties. Insert at least five records. Provide
screenshots of the process of creating the database including the database server role together with
explanations of the steps taken to complete the task.
Task ClientSide Program marks
Implement the clientside requirements nongraphical user interface and then provide code snippets for
each function with clear explanationscomments of key statements used.
The clientside would accept the Sales Representative ID and the number of Laptops sold. The client will
then forward the data to the server. Include input field validation wherever possible
i Create a thread using extending thread class or implementing a runnable interface and implement
a run method.
ii Request connection to the server.
iii. Accept and forward the necessary data to the server.
iv Receive and display the results from the server.
v Close the connection after use.
vi Create a main class, instantiate a Thread object, and start the Thread.
Task Serverside program
Implement the serverside requirements and then provide code snippets for each function with clear
explanationscomments of key statements used.
i Create a thread using extending thread class or implementing a runnable interface and implement
a run method.
ii After receiving the number of Laptops sold from the client side, the server should calculate the
sales profit and determine which charge rate to use
iii. Make connection to the database
iv Search the database using the charge code determined and retrieve the appropriate charge rate
v Use the retrieved charge rate to calculate the commission
vi Return to the client the sales profit calculated, the commission rate used, and the commission
value calculated
vii. Close the connection with the database when done
viii. Create a main class, instantiate a Thread object, and start the Thread
Task Utility Class
Develop a MenuDriven program of any utility class using the scenario given above and perform the
following operations.
i Create an object of the utility class based on the scenario with explanations of the method used.
ii Add an element to specified index of Java utility class based on the scenario with explanations of
the method used.
iii. Search for an element based on the scenario with explanations of the method used. Display the
element if found or an error message if the element does not exist.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
