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
What do work places allow a company to do
anygoal [31]
D. They provide a platform for collaboration
8 0
3 years ago
If you wanted to detect x-rays coming from the sun,where would you place the detector? Why?
Temka [501]
You would place it in orbit around Earth, as most X-rays are absorbed by the atmosphere, so you would want the detector outside of the atmosphere to accurately detect the X-rays.
5 0
3 years ago
Which folder(s) are commonly used in the Navigation Pane of Outlook? Check all that apply.
tensa zangetsu [6.8K]

The Navigation Pane in Outlook is used to switch between the different areas of Outlook,such as Mail, Calendar, Contacts, Tasks, and Notes., the Navigation Pane displays the folders within the view you are working with. The following folders are commonly used in the Navigation Pane in Outlook:

Inbox

Sent Items

Deleted Items

They are most commonly included in the Favorites.

6 0
3 years ago
How many times do you need to click the Format Painter button to apply copied formats to multiple paragraphs one right after the
const2013 [10]

The answer is (A) Twice

Format painter is that icon tool that looks like a paintbrush that is used to pick up formatting of an existing text and then paints it on the next text you select. If you wish to apply the formatting to more than one element, you should double-click the format painter and press esc key to deactivate.


5 0
3 years ago
Read 2 more answers
What are some options available when inserting an address block? Check all that apply. previewing postal code full address label
iVinArrow [24]

Answer:

A. previewing

B. postal code

C. full address

E. matching fields

F. company name

7 0
3 years ago
Read 2 more answers
Other questions:
  • The time between requests to a web server is exponentially distributed with mean 0.5 seconds. NOTE: This is a multi-part questio
    8·2 answers
  • Clicking on the Spelling & Grammar button is one way to correct a spelling error in Word. Please select the best answer from
    7·2 answers
  • The objective of an Enterprise Resource Planning (ERP) system is to create a customized software program that integrates the inf
    14·1 answer
  • You have several marketing documents that are published through AD RMS. However, you have three new marketing employees that req
    12·1 answer
  • you just finished creating an expense report table, but your boss tells you to create an extra column representing non-productio
    5·1 answer
  • Dynamic alliance networks work best in industries: a. that are mature and stable in nature. b. where the coordination of product
    9·1 answer
  • Which of the following is necessary to connect a computer outside of the hospital to the hospital's server?
    15·1 answer
  • Suppose that the instruction format for a modified Little Man Computer requires two consecutive locations for each instruction.
    5·1 answer
  • A group of users is unable to connect to the network. When testing several of the PCs and issuing the command ipconfig, the tech
    10·1 answer
  • Help me to write spaghetti stack function, please!!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!