Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING JAVA LANGUAGE Task 1: Create a class name Address with the following private instance fields city, street and zip Code. Your class should have

USING JAVA LANGUAGEimage text in transcribedimage text in transcribedimage text in transcribed

Task 1: Create a class name Address with the following private instance fields city, street and zip Code. Your class should have the following methods: . 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Public printAddress method to print the address e.g Makkah, King Fahad Street, 63114 Task 2: Create a class name Room with the following private instance fields rType and rArea. Your class should have the following methods: 2 argument constructors that initialize the value of class attributes to the values sent by the parameters. 2 setter methods 2 getter methods. Task 3: Create a class name House with the following private instance fields : hNumber as integer hAddress as an object of class Address hRooms as an array of objects from class Room Your class should have the following methods: No-argument constructor sets the hNumber to 0, hAddress and hRooms to null. . 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Private method countRooms that receives nothing and returns the size of the array hRooms Private countRooms that receives the type of the room and return how many rooms of the same type. Public printHouseInfo method to prints the house information e.g. House (4014) Located at Makkah, King Fahad Street, 63114 Has 5 rooms: 2 bed room(s) 2 bathroom(s) 1 kitchen(s) Task 4: Write a class called Test House with a main method, in this method do the following: Input House data by the user Create one object of House using the parameterized constructor. Print House information. Task 1: Create a class name Address with the following private instance fields city, street and zip Code. Your class should have the following methods: . 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Public printAddress method to print the address e.g Makkah, King Fahad Street, 63114 Task 2: Create a class name Room with the following private instance fields rType and rArea. Your class should have the following methods: 2 argument constructors that initialize the value of class attributes to the values sent by the parameters. 2 setter methods 2 getter methods. Task 3: Create a class name House with the following private instance fields : hNumber as integer hAddress as an object of class Address hRooms as an array of objects from class Room Your class should have the following methods: No-argument constructor sets the hNumber to 0, hAddress and hRooms to null. . 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Private method countRooms that receives nothing and returns the size of the array hRooms Private countRooms that receives the type of the room and return how many rooms of the same type. Public printHouseInfo method to prints the house information e.g. House (4014) Located at Makkah, King Fahad Street, 63114 Has 5 rooms: 2 bed room(s) 2 bathroom(s) 1 kitchen(s) Task 4: Write a class called Test House with a main method, in this method do the following: Input House data by the user Create one object of House using the parameterized constructor. Print House information. Task 1: Create a class name Address with the following private instance fields city, street and zip Code. Your class should have the following methods: 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Public printAddress method to print the address e.g Makkah, King Fahad Street, 63114 Task 2: Create a class name Room with the following private instance fields rType and rArea. Your class should have the following methods: 2 argument constructors that initialize the value of class attributes to the values sent by the parameters. 2 setter methods 2 getter methods. . Task 3: Create a class name House with the following private instance fields : hNumber as integer hAddress as an object of class Address hRooms as an array of objects from class Room Your class should have the following methods: No-argument constructor sets the hNumber to 0, hAddress and hRooms to null. 3 argument constructors that initialize the value of class attributes to the values sent by the parameters. 3 setter methods. 3 getter methods. Private method countRooms that receives nothing and returns the size of the array hRooms Private countRooms that receives the type of the room and return how many rooms of the same type. Public printHouseInfo method to prints the house information e.g. House (4014) Located at Makkah, King Fahad Street, 63114 Has 5 rooms: 2 bed room(s) 2 bathroom(s) 1 kitchen(s) Task 4: Write a class called Test House with a main method, in this method do the following: Input House data by the user Create one object of House using the parameterized constructor. Print House information. Submission: Use UQU Blackboard portal to submit your Lab work. Your project including all the classes after exporting it to zip file : Click on your project -> Click File -> Exporting Project -> To ZIP -> Click on Browse and then choose the place Desktop and write the file name your Name_yourID_Lab3.zip ) ->Click on ok -> Click on Export. Make sure that the exported file name end with .zip Please Note you are fully responsible of your submitted files and you must make sure it is the correct one before and after submission

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago