1z1-808 Exam Question 21
Given:

Which code fragment can replace the if block?


Which code fragment can replace the if block?

1z1-808 Exam Question 22
Given the code fragment:

Which option can replace xxx to enable the code to print 135?

Which option can replace xxx to enable the code to print 135?
1z1-808 Exam Question 23
Given:


1z1-808 Exam Question 24
Given the code fragment:

and the requirements of the application:
- It must display the menu.
- It must print the option selected.
- It must continue its execution till it reads `0'.
Which code fragment can be used to meet the requirements?


and the requirements of the application:
- It must display the menu.
- It must print the option selected.
- It must continue its execution till it reads `0'.
Which code fragment can be used to meet the requirements?

1z1-808 Exam Question 25
You are asked to develop a program for a shopping application, and you are given the following information:
The application must contain the classes Toy, EduToy, and ConsToy. The Toy class is the superclass

of the other two classes.
The int calculatePrice (Toy t) method calculates the price of a toy.

The void printToy (Toy t) method prints the details of a toy.

Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?
A:

B:

C:

D:

The application must contain the classes Toy, EduToy, and ConsToy. The Toy class is the superclass

of the other two classes.
The int calculatePrice (Toy t) method calculates the price of a toy.

The void printToy (Toy t) method prints the details of a toy.

Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?
A:

B:

C:

D:

