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
The general syntax to overload the stream extraction operator >> for a class is ____.
Aloiza [94]
Istream& operator>> (istream& input, Example& example)
{
// Extract your data from input stream here
return input;
}
5 0
3 years ago
Which type of reading is associated with an entry-level job?
REY [17]

Answer:

At entry level of any job, the reading that is essential to know is "<u>User manual</u>" Reading.

Explanation:

In any company or the firm in which some one wants to start at entry level, He needs to know about different rules, components, machines and systems of the company. To fulfill this purpose he needs to read some documents related to operations and functionalities of above mentioned parameters.

<em>These documents are called User Manuals. It contains all necessary information related to the system that will be helpful for the user. In this document step by step process are mentioned to handle the machine or device that is very helpful for entry level employ.</em>

5 0
3 years ago
There are two algorithms called Alg1 and Alg2 for a problem of size n. Alg1 runs in n2 microseconds and Alg2 runs in 100n log n
nataly862011 [7]

The answer & explanation for this question is given in the attachment below.

8 0
3 years ago
_______ is a variation of phishing that uses voice communication technology to obtain the information the attacker is seeking.
Zanzabum
It's voice phishing but it's also sometimes referred to as vishing 
4 0
3 years ago
How many broadcast domains are created when you segment a network with a 12-port switch?.
Elenna [48]

There is one broadcast domain created when you segment a network with a 12-port switch.  

<h3>What is a Broadcast domain?</h3>

A broadcast domain may be defined as a reasoning classification of a computer network that is significantly based on all nodes and can extend to each other by broadcast at the data link layer.

A network with a 12-port switch significantly creates 12 collision domains and 1 broadcast domain. This broadcast domain is large enough to perform specific functions within a network.

Therefore, there is one large broadcast domain created when you segment a network with a 12-port switch.  

To learn more about Broadcast domains, refer to the link:

brainly.com/question/14482282

#SPJ4

6 0
2 years ago
Other questions:
  • When you respond to an email from your bank that asks you to verify your account information, you may become a victim of a _____
    14·1 answer
  • A JOB LEADS SOURCE LIST is used to help record all of the job leads you can find. It includes contact information and a plan for
    8·1 answer
  • Software that translates the sound of human voice into text is called:________.
    14·1 answer
  • TWO QUICK QUESTIONS
    12·1 answer
  • a ____ is a horizontal or vertical bar that appears when the contents of an area may not be visible completely on the screen.
    15·1 answer
  • Analyze the following code:
    8·1 answer
  • VEE Physics 2006 E.C
    7·1 answer
  • In a relational database, the three basic operations used to develop useful sets of data are:_________.
    14·1 answer
  • Some programmers include scroll bars, title bars, buttons, and menus in a program simply by adding them to a layout through a pr
    10·1 answer
  • Hellpppppppppppppppp
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!