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
Tamara is writing a program to organize students in a class and needs to use operators to organize student grades, then compare
VMariaS [17]

Answer:   you said "Tamara needs to use

operators to organize the students' grades, then

operators to compare the results."

i think your right

Explanation:

sounds right.

3 0
3 years ago
(e) The entries in each column of the array A are sorted into strictly increasing order.
gizmo_the_mogwai [7]
The answer is 3 because
5 0
2 years ago
3. Describe what a pre-processor does in a network-based IDS tool such as Snort. Demonstrate your understanding of this function
MrRissso [65]

Answer:

Pre-processors look at organize traffic and screens parcel transmissions by examining andreassembling divided data.Frag2:preprocessor that battles against IP fracture attacks.Attackers sends a fragmentedTCP bundle with header data that gets entrance through a firewall.At the equivalent time,other parcels with vindictive information "slip" by the firewall undetected because of the fragmentationbeing so little by overwriting the header information.The frag2 pre-processor is specificallydesigned to break down bundle discontinuity to search out noxious information in the sections, which iswhy this pre-processor ought to never be turned off.Stream4:preprocessor Snort uses to coordinate assault marks over numerous packets.Anattacker endeavors to send different parcels into the system conveying parts of the attackpayload which are required to be reassembled by the host so as to start an attack.Stream4 stores the bits of the mark until all bundles are transmitted.Once they are alltransmitted, Stream4 finishes the signature and an alarm is created.

Explanation:

8 0
3 years ago
How to do a row of circles on python , with the commands , picture is with it .
kotykmax [81]

Answer:

o.o

Explanation:

5 0
3 years ago
Today's Apple Mac computers run with the same I-Ternal hardware as the Windows based PC true or false
Ksivusya [100]
Kinda of both. The processor, memory, hard drive and displays are all standard components and are provided by a variety computer competent manufacturers (except for the processors which are all supplied by Intel). Yet - while many components are standard - NO, the core, hardware components, like logic boards (motherboard), video cards, and other specialty components (some display connectors and displays, for example) are propriety Apple designs.
5 0
3 years ago
Other questions:
  • In the following statement:
    12·1 answer
  • Var cookie = "username=mike2009";
    10·1 answer
  • Special programs that facilitate communication between a device and the os are called
    12·1 answer
  • Write an expression that computes the average of the values 12 and 40.
    6·1 answer
  • Katarina is deciding whether to buy a desktop or a laptop computer. What will most likely help Katarina make her decision?
    10·2 answers
  • The command-line interface tells a user that it's ready to receive commands by displaying a specific set of characters called a(
    12·1 answer
  • Can anyone help me this is due today :) <br> Thank you so much
    14·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • What are the disadvantages of using grid analysis to help make decisions?
    13·2 answers
  • A ____________ is a collection of commands given a name.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!