Questions from Starting Out With Java


Q: Create a FitnessTracker class that includes three data fields for a fitness

Create a FitnessTracker class that includes three data fields for a fitness activity: a String for the name of the activity, an int for the number of minutes spent participating, and a LocalDate for t...

See Answer

Q: Create a class named BloodData that includes String fields that hold a

Create a class named BloodData that includes String fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –). Create a default constructor t...

See Answer

Q: a. Create a class to hold data about a high school

a. Create a class to hold data about a high school sports team. The Team class holds data fields for high school name (such as Roosevelt High), sport (such as Basketball), and team name (such as Dolph...

See Answer

Q: Name at least three real-life objects that are instances of

Name at least three real-life objects that are instances of each of the following classes: a. Song b. CollegeCourse c. Musician

See Answer

Q: Write a Java application that prompts the user for an int and

Write a Java application that prompts the user for an int and a double and then uses Math class methods to display each of the following: a. The square root of the int b. A random number between 0 and...

See Answer

Q: Write a program that declares two LocalDate objects and prompts the user

Write a program that declares two LocalDate objects and prompts the user for values. Display output that demonstrates the dates displayed when one, two, and three months are added to each of the objec...

See Answer

Q: Write an application that prompts a user for the user’s month,

Write an application that prompts a user for the user’s month, day, and year of birth and uses the LocalDate class to compute the day on which the user will become (or became) 10,000 days old. Save th...

See Answer

Q: The LocalDate class includes an instance method named lengthOfMonth() that returns

The LocalDate class includes an instance method named lengthOfMonth() that returns the number of days in the month. Write an application that allows the user to enter a month, day, and year and uses m...

See Answer

Q: Each of the following files in the Chapter04 folder of your downloadable

Each of the following files in the Chapter04 folder of your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the program. After you correct the er...

See Answer

Q: Each of the following files in the Chapter01 folder in your downloadable

Each of the following files in the Chapter01 folder in your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the errors. After you correct the err...

See Answer