1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zysi [14]
3 years ago
7

Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an inter

face named ITurnable that contains a single method named Turn(). The classes named Page, Corner, Pancake, and Leaf implement ITurnable.
Computers and Technology
1 answer:
pickupchik [31]3 years ago
4 0

Answer:

1) TurningDemo

public class TurningDemo

{   public static void main(String[] args)

 {      

    Leaf obj1 = new Leaf();

    Corner obj2= new Corner();

    Page obj3= new Page();

    Pancake obj4= new Pancake();

 } }

2) ITurnable

public interface ITurnable

{

 public void Turn();

}

3) Leaf class:

public class Leaf implements ITurnable

{

}

Page class:

public class Page implements ITurnable

{

}

Corner class:

public class Corner implements ITurnable

{

}

Pancake class:

public class Pancake implements ITurnable

{

}

Explanation:

The first is TurningDemo application which creates instance obj1, obj2, obj4 and obj4 of four classes Page, Corner, Pancake, and Leaf. new keyword is used to create new object or instance of each class.

The second is ITurnable interface. It contains a single method Turn() which is of type public.

Thirdly, classes named Page, Corner, Pancake, and Leaf implement ITurnable. implements keyword is used to implement a interface so this interface can be used by these classes.

These classes can also implement turn() of ITurnable interface as follows:

Leaf class:

public class Leaf implements ITurnable

{  public void turn()

 {

 }

}

Page class:

public class Page implements ITurnable

{

public void turn()

 {

 }

}

Corner class:

public class Corner implements ITurnable

{ public void turn()

 {

 }

}

Pancake class:

public class Pancake implements ITurnable

{   public void turn()

 {

 }

}

You might be interested in
Joe always misspelled the word calendar what function corrects the word
Lostsunrise [7]

Answer: Auto correct

6 0
3 years ago
Read 2 more answers
Which one of the following business names would be rated Incorrect for name accuracy? Answer McDonald's McDonald's H&M McDon
Damm [24]

McDonald's H&M McDonalds Inc is incorrect for name accuracy.

Explanation:

The correct Name is McDonald's. But Mc Donald's H&M and McDonalds inc is incorrect for name accuracy.

McDonald's is a fast-food company based in America. It has its retail outlets throughout the world. It is very famous for its burgers and french fries. It is the world's second-largest employer in the private sector. It is a symbol of globalization as it has its outlets throughout the world.

6 0
3 years ago
Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
satela [25.4K]

Answer:it has high coupling

Explanation: Coupling is the property in the field of computer program that is defined as the functions ,data and  codes of the program are dependent on each other and cannot be changed independently if requires. Thus,high amount of coupling is not considered as good factor due to high interdependence. Loose coupling can be still permitted.

Other options are correct because name of the class should reflect the purpose and well defined responsibilities should be present, modeling of certain component and high cohesion means keeping similar functions togather is also required. So, the only bad factor is high coupling

6 0
3 years ago
There are six different sequences for the three approval tasks: check inventory; check credit; check special terms.
Lana71 [14]

Answer:

i dont know i am 13

Explanation:

3 0
3 years ago
The correct or acceptable way of communicating on the internet is known as
stepladder [879]
I want to say e-mail.

8 0
3 years ago
Other questions:
  • 1. Why is it important to compare features of a computer before making a purchase?
    13·2 answers
  • Your task is to write a C program that measures the latencies of various system calls. In particular, you want to know 1) the co
    5·1 answer
  • A text file has been transferred from a Windows system to a Unix system, leaving it with the wrong line termination. This mistak
    15·1 answer
  • The reliance on _____ as the design methodology for relational databases is seen as a stumbling block to its use in OLAP systems
    5·1 answer
  • Does anyone know the answer for this? I’m extremely confused.
    8·2 answers
  • Which of the following are part of personal growth? Check all of the boxes that apply.
    8·2 answers
  • Liam is at the park an would like to play soccer. He tell another kid at the park that he would hurt him if he couldn't play soc
    10·2 answers
  • Super Scores
    11·1 answer
  • You and a friend have just started a small business. How could you use the Internet to make your business successful?
    15·2 answers
  • Does The ps5 digital have a disc drive even Though ps4 games are not compatible
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!