Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.Which of the following are critical to fix the class below which is claimed to use the Singleton pattern? Check all that apply The constructor

1.Which of the following are critical to fix the class below which is claimed to use the Singleton pattern?

image text in transcribed

Check all that apply

The constructor Singleton( ) should be static

The constructor Singleton( ) should be private

The getInstance( ) should be static

The getInstance( ) should be public

2.The interfaces Serializable and Cloneable in Java are empty (no operations declared), while the interface Runnable declares one operation run( ). Which one is correct?

They are all Marker interfaces.

Two of them are not Marker interfaces.

One of them is not a Marker interface.

None of them is a Marker interface.

3.Many clients compete for a limited number of objects created from a ServiceProvider class to do their jobs. A proposal is to have one Manager object take full charge of all service requests from clients. Which design pattern is less likely to be used?

Object Pool

Marker

Singleton

Delegation

Singleton +Singleton -getinstance() -operation 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago