1. Write the first line of the definition for a Stereo class. The class should extend the SoundSystem class, and it should implement the CDplayable, TunerPlayable, and CassettePlayable interfaces. 2....


1. Write the first line of the definition for a Stereo class. The class should extend the


SoundSystem class, and it should implement the CDplayable, TunerPlayable, and


CassettePlayable interfaces.


2. Write an interface named Nameable that specifies the following methods:


public void setName(String n)


public String getName()


3. Look at the following interface:


public interface Computable


{


 double compute(double x);


}


 Write a statement that uses a lambda expression to create an object that implements the Computable interface. The object’s name should be half. The half object’s compute method should return the value of the x parameter divided by 2.

Nov 23, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here