solve the searh with select and doing the calculate Task1: In Oman, the Oman Water and Wastewater Services Company bills its clients at various rates

Answered step by step
Verified Expert Solution
Question
66 users unlocked this solution today!
solve the searh with select and doing the calculate
image text in transcribed
image text in transcribed
Task1: In Oman, the Oman Water and Wastewater Services Company bills its clients at various rates per gallon depending on use (Gallons). The total consumption usage 0.002 (rate per unit) is used to calculate customer bills for residential customers, while the total consumption usage 0.0035 is used to calculate customer bills for commercial customers (rate per unit). Keep in mind that when a consumer consumes more units, the charge per unit increases Oman Water and Wastewater Services Company has asked you to create an interactive system (tlonGraphical User Interface) to calculate the water bills of its consumers. Allow the user to input the bill number, the kind of customer, and the total amount used (in gallons) on the client side. The client will then forward the type of customer and total consumption usage (in gallons). Assume that number 1 represents the residential customer, whereas number 2 represents the commercial customer. The server will choose the tariff rate to use, calculate the bill, and then transmit the bill and the tariff rate used back to the client after receiving the kind of customer and the total consumption usage (in gallons) from the client. The client must display the bill as soon as they are received, and the tariff rate applied. Implement the Java program with the option of the server connecting to a database for answering user queries. The specification of your program should be as follow. 2- Server-side program: Implement the server-side requirements and then provide code snippets for each function with clear explanations/comments of key statements used. i. Create a thread using extending thread class or implementing a runnable interface and implement a run method. ii. ii. After receiving the Customer Type and consumption from the client side, the server should make a connection to the database. iii. iii. Search the database using the Customer Type and retrieve the appropriate tariff rate. iv. Use the retrieved tariff rate to calculate the bill. v. Return to the client the bill, and the tariff rate used. vi. Close the connection with the database when done. vii. Create a main class called custServer, define the main method, creation of client object, and start the thread

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Link Copied!

Step: 1

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

100% Satisfaction Guaranteed-or Get a Refund!

Step: 2Unlock detailed examples and clear explanations to master concepts

blur-text-image_2

Step: 3Unlock to practice, ask and learn with real-world examples

blur-text-image_3

See step-by-step solutions with expert insights and AI powered tools for academic success

  • tick Icon Access 30 Million+ textbook solutions.
  • tick Icon Ask unlimited questions from AI Tutors.
  • tick Icon Order free textbooks.
  • tick Icon 100% Satisfaction Guaranteed-or Get a Refund!

Claim Your Hoodie Now!

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books
flashcard-anime

Study Smart with AI Flashcards

Access a vast library of flashcards, create your own, and experience a game-changing transformation in how you learn and retain knowledge

Explore Flashcards

Students Have Also Explored These Related Databases Questions!

Q:

2. Explain grades or test results.

Answered: 3 weeks ago