Exam 12: Object-Oriented Design

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Suppose you are developing a payroll application that computes and displays weekly paycheck amounts for various employees. As a result of the design phase, the partial Employee class below is developed. Select the method header that best completes the class, according to the method comments. public class Employee { Private double hourlyRate; Private int hoursWorked; /** Modifies the hourly rate for this employee. @param newHourlyRate the rate per hour earned by the employee */ _________________________________________ { // method body } }

(Multiple Choice)
4.7/5
(35)

Consider the following code snippet: public class Manager extends Employee { Private Project[] projects; Private Address address; ) . . } Which of the following statements is NOT correct?

(Multiple Choice)
4.9/5
(33)

You are designing a software solution for a veterinary clinic. The clinic provides various services for each pet on each visit. You have decided that the following nouns apply to the requirements: Customer, Address, Pet, Visit, Visit Date, Service Charge, Total Charge, Next Appointment. Which of these should be represented as instance variables?

(Multiple Choice)
4.9/5
(31)

If many classes of a program depend on each other, we say that ____.

(Multiple Choice)
4.9/5
(32)

Consider the following code snippet: public class Purse { Private Coin[] coins; ) . . } Which of the following statements is correct?

(Multiple Choice)
4.9/5
(46)

Before you begin designing a solution, you should ____.

(Multiple Choice)
4.7/5
(48)

You have determined a need for a Book class and a Page class in your program. Which relationship is most appropriate between these classes?

(Multiple Choice)
4.9/5
(35)

You have determined the need for a File class and a Folder class in your program. Which of the following would best describe the relationship between these classes?

(Multiple Choice)
4.8/5
(30)

In a UML diagram, dependency is denoted by ____.

(Multiple Choice)
4.7/5
(42)

Aggregation denotes that ____.

(Multiple Choice)
4.8/5
(38)

A CRC card describes ____.

(Multiple Choice)
4.8/5
(37)

Consider the following code snippet: public class Motorcycle { Private Tire[] tires; ) . . } Which of the following statements correctly describes the relationship between the Motorcycle and Tire classes?

(Multiple Choice)
4.8/5
(36)

You are designing an application to support a veterinary clinic. Which of the following probably should NOT be represented as an object?

(Multiple Choice)
4.7/5
(41)

Consider the following code snippet: public class Motorcycle { Private Tire[] tires; ) . . } This code is best described as an example of ____.

(Multiple Choice)
4.9/5
(40)

Under which of the following conditions would the public interface of a class be considered cohesive?

(Multiple Choice)
5.0/5
(37)

You are designing a software solution for an automobile rental company. A customer may rent only a single auto at a given time. You have decided that the following classes are needed: Auto, Customer, Address, Rental Contract. Which of these should be represented as aggregation?

(Multiple Choice)
4.9/5
(41)

Which of the following code snippets denotes that the Pen class depends on the Ink class?

(Multiple Choice)
4.9/5
(37)

Consider the following code snippet: public class Motorcycle extends Vehicle { ) . . } Which of the following statements correctly describes the relationship between the Motorcycle and Vehicle classes?

(Multiple Choice)
4.8/5
(45)

In a UML diagram, inheritance is denoted by ____.

(Multiple Choice)
4.7/5
(29)

In a UML diagram, aggregation is denoted by ____.

(Multiple Choice)
5.0/5
(41)
Showing 21 - 40 of 104
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)