Please answer guys.?
I'm waiting
.
Extracted text: Q4. In a restaurant, whenever customers visit, they are provided with items from two categories, one category is fixed for every customer like water bottle, salad and another category is according to the list of items that the customer orders like number of biriyani plates, number of dosas etc. Now, write an abstract class fixedCategory having the price of the fixed items as data member and an abstract method complimentaryCost(). Write another derived class orderedCategory which will have price of the food items that the customer has ordered as instance variable and one method orderedltemsCost() which will calculate the cost of ordered items. Also implement the abstract method complimentaryCost() in this derived class to find the cost for complementary items. Assume the customer has ordered each food item only once. Write a java code to display the attributes from each of the classes creating proper instances and invoking the methods from another main class customerCost. Assume price of water bottle is 20, salad 80, biriyani 450, dosa 150. Description Description Sample Input Sample Output Variables double bottle_price, salad_price, Bottle_price=20, Salad_price=80 fixedCategory abstract class complimentaryCost() is abstract method complimentaryCost() is abstract method fixedCategory abstract class biriyani_price-450, dosa_price=150 orderedCategory derived concrete class Variable biriyani_price, dosa_price orderedCategory derived concrete class orderedltemsCost() is a concrete method which will add the cost of the food items cost of ordered items is 600 Give definition for the abstract method complimentaryCost()which will add the cost of the food items orderedCategory derived concrete class cost for complementary items is 100 customerCost is a public class where main function/method is written
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here