Questions from Starting Out With Java


Q: Write an application that accepts up to 20 Strings, or fewer

Write an application that accepts up to 20 Strings, or fewer if the user enters a terminating value. Store each String in one of two lists—one list for short Strings that are 10 characters or fewer an...

See Answer

Q: Write an application that stores nine integers in an array named numbers

Write an application that stores nine integers in an array named numbers. Display the integers from first to last, and then display the integers from last to first. Save the file as NineInts.java.

See Answer

Q: Each week, the Pickering Trucking Company randomly selects one of its

Each week, the Pickering Trucking Company randomly selects one of its 30 employees to take a drug test. Write an application that determines which employee will be selected each week for the next 52 w...

See Answer

Q: Write an application containing an array of 15 String values. Accept

Write an application containing an array of 15 String values. Accept any number of Strings up to 15 from a user, and display them in ascending order. Save the file as StringSort.java.

See Answer

Q: The mean of a list of numbers is its arithmetic average.

The mean of a list of numbers is its arithmetic average. The median of a list is its middle value when the values are placed in order. For example, if an ordered list contains 1, 2, 3, 4, 5, 6, 10, 11...

See Answer

Q: In Chapter 8, you created a Rental class for Sunshine Seashore

In Chapter 8, you created a Rental class for Sunshine Seashore Supplies. Now extend the class to create a LessonWithRental class. In the extended class, include a new boolean field that indicates whet...

See Answer

Q: Radio station KJAVA wants a class to keep track of recordings it

Radio station KJAVA wants a class to keep track of recordings it plays. Create a class named Recording that contains fields to hold methods for setting and getting a Recording’s title, artist, and pla...

See Answer

Q: Write an application that stores at least five different college courses (

Write an application that stores at least five different college courses (such as CIS101), the time it first meets in the week (such as Mon 9 am), and the instructor (such as Khan) in a two-dimensiona...

See Answer

Q: Create an application that contains an enumeration that represents the days of

Create an application that contains an enumeration that represents the days of the week. Display a list of the days, and then prompt the user for a day. Display business hours for the chosen day. Assu...

See Answer

Q: Create a program with an enumeration that contains the names of the

Create a program with an enumeration that contains the names of the eight planets in our solar system. Prompt the user for a planet name and use the ordinal() method to display the planet’s position....

See Answer