Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

We will begin the vacation program with building our first two classes with instance variables. Please use the attached Hotel.java and Guest.java files to create your constructor and instance...

1 answer below »

We will begin the vacation program with building our first two classes with instance variables. Please use the attached Hotel.java and Guest.java files to create your constructor and instance variables.

Hotel Requirements

The package name will be hotelPackage

Create two instance variables

  • String variable called hotelName
  • integer variable called numOfRooms

Create a constructor

  • The constructor will initialize your instance variables
  • The constructor will have arguments that relate to the numOfRooms and hotelName

Guest Requirements

The Guest class will be in a new package called guestPackage

Instance Variables

  • Create a variable name of type String
  • Create a variable creditCardNum of type int
  • Create a variable daysVacationing of type int

Create Constructor

  • The constructor will initialize your instance variables

Submission

Submit the .java files called Hotel.java and Guest.java .Do notsubmit a zip file or project file.

Attachment

Answered Same Day Sep 12, 2021

Solution

Sayed Shad Ahmad answered on Sep 13 2021
164 Votes

Package guestPackage
package guestPackage;
Class Guest
public class Guest
{
    
Instance variables for the Guest class
    private String name;
    private int creditCardNum;
    private int daysVacationing;
    
    
Constructor to build the Guest object
    public Guest(String name, int creditCardNum, int...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here