Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notes: 1. Q1, Q2 and Q3:(a) Execute your program on online or offline compiler (NetBeans/blueJ). (b) Insert screenshot (picture) of the program code (write your

image text in transcribed
Notes: 1. Q1, Q2 and Q3:(a) Execute your program on online or offline compiler (NetBeans/blueJ). (b) Insert screenshot (picture) of the program code (write your name and ID in the program's first line as comment) and output in word file and then convert into pdf (Save as pdf). Q4: Write the answer. 2. Only pdf file is accepted. 3. Assignment file name should be your University ID. 4. Student who submit copied work will get Zero Marks. 5. Upload the assignment through your BLACKBOARD account only. PROBLEM STATEMENTS Q1) Create a class Travel_Package having fields Destination, TourGuideName, PackageCode, and Price. Declare a mutator method namely updatePrice 0 to increase the Price by 300 SAR. Suppose the Price before update was 3800 SAR. (2.5 Marks) Q2) Create a class World with fields continents and countries and implement the concept of constructor overloading. Declare 3 constructors (Empty constructor, constructor with one parameter, Constructor with two parameter). (2.5 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.5 Marks)

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

6 Compare and contrast mentoring and coaching.

Answered: 1 week ago