Questions from Starting Out With Java


Q: Write an application that uses the LocalDate class to access the current

Write an application that uses the LocalDate class to access the current date. Prompt a user for a month, day, and year. Display a message that specifies whether the entered date is (1) not this yea...

See Answer

Q: Acme Parts runs a small factory and employs workers who are paid

Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour...

See Answer

Q: Create a class named JobApplicant that holds data about a job applicant

Create a class named JobApplicant that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whether the applicant is skilled in each of the followin...

See Answer

Q: Create an Automobile class for a dealership. Include fields for an

Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, and miles per gallon. Include get and set methods for each field. Do not allow the ID to be nega...

See Answer

Q: Create a class named Apartment that holds an apartment number, number

Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get met...

See Answer

Q: In previous chapters, you have created a Rental class for Sunshine

In previous chapters, you have created a Rental class for Sunshine Seashore Supplies. The class contains a default constructor as well as an overloaded version that requires a contract number (a lette...

See Answer

Q: Use the Web to locate the lyrics to the traditional song “

Use the Web to locate the lyrics to the traditional song “The Twelve Days of Christmas.” The song contains a list of gifts received for the holiday. The list is cumulative so that as each “day” passes...

See Answer

Q: Assume that the population of Mexico is 128 million and the population

Assume that the population of Mexico is 128 million and the population of the United States is 323 million. Accept two values from a user: an assumption of an annual increase in the population of Mexi...

See Answer

Q: The Huntington High School basketball team has five players named Ali,

The Huntington High School basketball team has five players named Ali, Bob, Cai, Dan, and Eli. Accept the number of points scored by each player in a game, and create a bar chart that illustrates the...

See Answer

Q: Create a class named Purchase. Each Purchase contains an invoice number

Create a class named Purchase. Each Purchase contains an invoice number, amount of sale, and amount of sales tax. Include set methods for the invoice number and sale amount. Within the set method for...

See Answer