Question: Java code Q1) Create a class Restaurant having fields Item_name Item_code, and Item_Price. Declare a mutator method namely updateItem() to increase the Item_price by 3

Q1) Create a class Restaurant having fields Item_name Item_code, and Item_Price. Declare a mutator method namely updateItem() to increase the Item_price by 3 SAR. Suppose the item price before update was 10 SAR. (2 Marks) Q2) Create a class World with fields continents and countries and implement the concept of constructor overloading. Declare 3 constructors (Empty constructor, Partial argument constructor, Full argument constructor). (2 Marks) Q3) Create a class Shape that defines a variable named window of type Rectangle, and then create a rectangle object and assign it to the variable window. The rectangle constructor has two int parameters. (2 Marks)
Step by Step Solution
3.41 Rating (148 Votes )
There are 3 Steps involved in it
Q1 Heres the implementation of the Restaurant class with the updateItem method class Restaurant def ... View full answer
Get step-by-step solutions from verified subject matter experts
