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

Just follow the instruction and don't use any language other than java. Don't use fancy programing language that is not required because this is a java fundamental course. The Attached Example is the...

1 answer below »
Just follow the instruction and don't use any language other than java. Don't use fancy programing language that is not required because this is a java fundamental course. The Attached Example is the file I uploaded earlier this semester. Use simple comments and following my heading. Thank you very much.

Download the four Java files to the same folder.You may need to refresh the project in Eclipse for the files to appear.

You will be making changes to the Passenger,Seat, and Flight classes.Submit only those three Java files via the assignment link.

Answered Same Day May 05, 2021

Solution

Kashish answered on May 07 2021
151 Votes
/**
* Passenger on a flight has first and last name with optional middle name. Also
* keeps track of type of pet accompanying passenger, if any
*
public class Passenge
{
    private String firstName;
    private String middleName;
    private String lastName;
    private int petType;            
index value in Flight.PET_TYPES a
ay
    /** no-arg constructor **
    public Passenger()
    {
        firstName = null;
        middleName = null;
        lastName = null;
        petType = 0;
    }
    /**
     * 4. TO DO 4-arg constructo
     *
    public Passenger(String last, String first, String middle, int pet)
    {
        setLastName(last);
        setFirstName(first);
        setMiddleName(middle);
        setPetType(pet);
    }
    /**
     * 1. TO DO static method formatString
     *
    public static String formatString(String word)
    {
        if(word.length() == 0)
        {
            return word;
        }
        char[] charA
ay = word.toLowerCase().toCharA
ay();
        charA
ay[0] =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here