Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Saud Bahwan Automotive LLC in Sultanate of Oman has partnered with Toyota to make it one of the most loved brands in the country.

The Saud Bahwan Automotive LLC in Sultanate of Oman has partnered with Toyota to make it one of the most loved brands in the country. This company is planning to offer certain promotions for Omani as well as expat female nationals. The promotions include discounts for females only and is offered on purchase of a particular vehicle. If the Buyer is a female and aged between 25 and 35 discount of 15% will be offered on the overall cost of the particular vehicle. If the Buyer is a female and aged between 36 and 45 discount of 10% will be offered on the overall cost of the particular vehicle. If the Buyer is above 45 years of age a discount of 5% on the overall cost is offered. Write a program for the company above using socket programming (graphical user interface is not required) to calculate the final cost of the vehicle after discount for different types of Buyers. On the client side, allow the user to enter the gender, age, and the price of the vehicle. The client will then forward the age of the Buyer to the server. The promotion offered is only for females hence the client will forward details only of female buyers. Upon receiving the age of the buyer and the total cost of the vehicle, the server will determine which discount option to use, calculate the final price after discount, and then send the final cost and the discount given back to the buyer back to the client. Upon receiving the final cost and the discount rate used, the client should display them.

*******

The client side, allow the user to enter the gender, age, and the vehicle price from the keyboard. The client will then forward the age of the buyer to the server and include field validation wherever possible. a. Request connection to the server b. Accept and forward the necessary data to the server

c. Receive and display the results from the server d. Close the connection after use 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions