Exam 12: Object-Oriented Design

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

Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String.

Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
Verified

B

Suppose that the invoice-printing application from section 12.3 needs to be enhanced by making it possible for class InvoicePrinter to store several invoices to be printed.Select the code segment that best illustrates reuse of the existing Invoice class for this purpose. Suppose that the invoice-printing application from section 12.3 needs to be enhanced by making it possible for class InvoicePrinter to store several invoices to be printed.Select the code segment that best illustrates reuse of the existing Invoice class for this purpose.

Free
(Multiple Choice)
4.7/5
(42)
Correct Answer:
Verified

D

Which of the following most likely indicates that you have chosen a good name for your class?

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

B

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.8/5
(27)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct? Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct?

(Multiple Choice)
4.8/5
(32)

Regarding the invoice-printing application from section 12.3, it is decided that a Customer class is needed to store customer information, including the name, billing address, and a customer id number to be printed at the top of each invoice.Since the existing Address class already stores the customer's name and physical address, the new Customer class can simply reuse Address.Select the code segment that best illustrates how the Customer class can reuse the existing Address class. Regarding the invoice-printing application from section 12.3, it is decided that a Customer class is needed to store customer information, including the name, billing address, and a customer id number to be printed at the top of each invoice.Since the existing Address class already stores the customer's name and physical address, the new Customer class can simply reuse Address.Select the code segment that best illustrates how the Customer class can reuse the existing Address class.

(Multiple Choice)
4.9/5
(27)

The textbook recommends a five-part program development process consisting of the following activities: i.Use UML diagrams to record class relationships. II.Gather requirements. III.Implement the program. IV.Use CRC cards to identify classes. v.Use javadoc to document method behavior. Which is the correct order in which these activities should be completed?

(Multiple Choice)
4.9/5
(32)

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 classes?

(Multiple Choice)
4.7/5
(45)

____ relationships come from the collaboration columns on the CRC cards.

(Multiple Choice)
4.9/5
(38)

In a UML diagram, inheritance is denoted by ____.

(Multiple Choice)
4.9/5
(36)

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. 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.

(Multiple Choice)
4.9/5
(41)

Which of the following statements about associations between classes is true?

(Multiple Choice)
4.8/5
(36)

Given the following diagram: Given the following diagram:   What does this diagram indicate about the relationship between the customers and bank accounts? What does this diagram indicate about the relationship between the customers and bank accounts?

(Multiple Choice)
4.8/5
(36)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? Which of the following statements is NOT correct?

(Multiple Choice)
4.8/5
(43)

Which of the following statements is correct?

(Multiple Choice)
4.8/5
(43)

Which of the following questions should you ask yourself in order to determine if you have named your class properly?

(Multiple Choice)
4.9/5
(36)

You are designing a software solution for an automobile rental company.You have decided that the following nouns apply to the requirements: Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate, Total.Which of these should be represented as instance variables?

(Multiple Choice)
4.7/5
(40)

Every dolphin has a fin.Every dolphin is an animal.What kind of relationship would best describe the first and second statements?

(Multiple Choice)
4.9/5
(34)

Which of the following statements is true about Coupling?

(Multiple Choice)
4.7/5
(49)

Classes often correspond to ____ in a requirements description.

(Multiple Choice)
4.8/5
(24)
Showing 1 - 20 of 104
close modal

Filters

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