Question
scenario :The Saud Bahwan Automotive LLC in Sultanate of Oman has partnered with Toyota to make it one of the most loved brands in the
scenario :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.
question :
Using the same scenario develop a Menu-Driven program using HashSet (Utility Class) class to perform the following operations as described below.
a. Create an object of HashSet class based on the scenario
b. Create a method that will allow inserting an element to HashSet Class based on the scenario. The user to enter the gender, age, and the vehicle price from the keyboard and include field validation wherever possible.
c. Create a method that will allow to compare two sets and retain elements which are same on both sets
d. Create a method that will allow to check whether an object exists or not in HashSet class based on the scenario.
java /java /java . please i need the correct solustion as soon as possible
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started