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
Learning Management Systems (LMS) allow students to interact with each other, but NOT their teachers.
VMariaS [17]

Answer:

what do you mean friend not for teacher

8 0
2 years ago
Read 2 more answers
Which of these files, when included in a program, will provide user assistance?
34kurt

Answer:

Answer for this question is D

Explanation:

Help flies

4 0
3 years ago
Read 2 more answers
__________ is the electronic transmission of signals for communications, which enables organizations to carry out their processe
Serjik [45]

Telecommunications is the electronic transmission of signals for communications, which enables organizations to carry out their processes and tasks through effective computer networks

4 0
3 years ago
// This pseudocode segment is intended to compute the number
Harlamova29_29 [7]

DEBUG01-01

//This pseudocode is intended to describe

//computing the price of an item on sale for 10% off

START

  input origPrice

  discount = origPrice * 0.10

  finalPrice = origPrice - discount

  output finalPrice

STOP

DEBUG01-02

//This pseudocode is intended to compute the number

//of miles per gallon you get with your automobile.

START

  input milesTraveled

  input gallonsOfGasUsed

  milesPerGallon = milesTraveled / gallonsOfGasUsed

     //milesPerGallon is computed using division

  output milesPerGallon

     //miles is misspelled, and the P in milesPerGallon should be uppercase

STOP

  //Program should end with stop

DEBUG01-03

//This pseudocode is intended to describe

//computing the per day cost of your rent

//in a 30-day month

START

  input rent

  costPerDay = rent / 30

     // Comment indicates 30-day month

  output costPerDay

     // output should be costPerDay

STOP

<h3>What is an algorithm?</h3>

An algorithm can be defined as a standard formula which comprises a set of finite steps and instructions that must be executed by a software program, in order to proffer solutions to a problem on a computer, under appropriate conditions.

         

<h3>What is a pseudocode?</h3>

A pseudocode can be defined as a description of the steps that are contained in an algorithm, especially through the use of a plain (natural) language.

<u>Note:</u> The indentation may change due to Brainly's text editor.

Read more on pseudocode here: brainly.com/question/13208346

#SPJ1

<u>Complete Question:</u>

Your downloadable files for Chapter 1 include DEBUG01-01.txt, DEBUG01-02.txt, and DEBUG01-03.txt. Each file starts with some comments (lines that begin with two slashes) that describe the program. Examine the pseudocode that follows the introductory comments, then find and correct all the bugs.

4 0
1 year ago
I need help now I really do what is the answer thank you
Svetradugi [14.3K]
The answer is c
just replace the y with the y value and the x with the x value
4 0
3 years ago
Other questions:
  • Which of these is not a modifier?<br><br> short<br><br> unsigned<br><br> nest<br><br> long
    15·1 answer
  • An essential skill today is knowing how to cite sources properly. Creative Commons has a system of licenses and tools for creato
    11·1 answer
  • Answer the following questions which are based on the study "Patients' Engagement with Sweet Talk." Submit your answers to the e
    9·1 answer
  • How can you create the first row of the table as the header of the table?
    14·2 answers
  • 1. What makes discrimination different from harassment? (Don't give me definitions.)
    5·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • Data ____ refers to the accuracy of the data in a database
    9·1 answer
  • Which of the following is as result of division of Labour​
    5·1 answer
  • Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and
    13·1 answer
  • 18. WHICH MENU WOULD MOST LIKELY ALLOW YOU TO ADJUST YOUR LINE SPACING? *
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!