Questions from Starting Out With Java


Q: Assume that the following is a constructor, which appears in a

Assume that the following is a constructor, which appears in a class: ClassAct(int number) { item = number; } 1. What is the name of the class that this constructor appears in? 2. Write a statement th...

See Answer

Q: Is it required that overloaded methods have different return values, different

Is it required that overloaded methods have different return values, different parameter lists, or both?

See Answer

Q: What is a method’s signature?

What is a method’s signature?

See Answer

Q: Look at the following class: public class CheckPoint {

Look at the following class: public class CheckPoint { public void message(int x) { System.out.print("This is the first version "); System.out.println("of the method."); } public void message(String x...

See Answer

Q: How many default constructors may a class have?

How many default constructors may a class have?

See Answer

Q: What is a problem domain?

What is a problem domain?

See Answer

Q: When designing an object-oriented application, who should write a

When designing an object-oriented application, who should write a description of the problem domain?

See Answer

Q: Write an if statement that prints the message “The number

Write an if statement that prints the message “The number is valid†if the variable temperature is within the range −50 through 150.

See Answer

Q: How do you identify the potential classes in a problem domain description

How do you identify the potential classes in a problem domain description?

See Answer

Q: What are a class’s responsibilities?

What are a class’s responsibilities?

See Answer