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

Java code  Q1) Create a class Restaurant having fields Item_name Item_code, and Item_Price. Declare

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

1 Expert Approved Answer
Step: 1 Unlock

Q1 Heres the implementation of the Restaurant class with the updateItem method class Restaurant def ... View full answer

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

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

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!