Questions
PLEASE CODE THIS IN JAVA Create a driver class Playground that contains the function, public static...

PLEASE CODE THIS IN JAVA

Create a driver class Playground that contains the function, public static void main(String[] args) {}.

  • Create 2 SportsCar and 2 Airplane instances using their constructors. (SPORTSCAR AND AIRPLANE CLASSES LISTED BELOW THIS QUESTION.
  • Add all 4 instances into a single array called, “elements.”
  • Create a loop that examines each element in the array, “elements.” If the elements item is a SportsCar, run the sound method and if the item is an Aeroplane, run it’s ChangeSpeed method.
  • Run the getCount() method (GET COUNT METHOD SHOWN IN CAR CLASS BELOW THIS QUESTION) to display how many total cars were created.

SportsCar Class:

class SportsCar extends Car{
   private String roof;
   private int doors;
   public SportsCar(String r,int d,String m) {
       super(0,m);
       roof=r;
       doors=d;
   }
   public void ChangeSpeed() {
       speed+=20;
       if(speed>65) {
           throw new IllegalArgumentException("Invalid Speed");
       }
      
   }
   public void sound() {
       System.out.println("broooom");
   }
   @Override
   public void Start() {
      
   }
   @Override
   public void Stop() {
   }
}

Airplane Class:

//Airplane.java
public class Airplane implements Vehicle{

    int speed;

    public Airplane() {
        this.speed = 0;
    }

    public void Start() {
        System.out.println("Start method called");
    }

    public void Stop() {
        System.out.println("Stop method called");
    }

    public void ChangeSpeed() {
        speed += 5;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }
}

Car Class:

interface Vehicle{
        void Start();
        void Stop();
        void ChangeSpeed();
}
abstract class Car implements Vehicle{
        private int year;
        private int speed;
        private String make;
        private static int count=0;
        public Car(int aYear, String aMake) {
                year = aYear;
                make = aMake;
                speed=0;
                count++;
        }
        abstract void sound();
        public static int getCount() {
                return count;
        }
        
}

In: Computer Science

How does pH and temperature play a role in the formation of a desirable texture in...

How does pH and temperature play a role in the formation of a desirable texture in yogurt? In your description mention how the processing methods for making yogurt result in the denaturation of whey and coagulation of casein to form a desirable gel-like structure.

In: Chemistry

There are five different levels of regional trade agreements – demonstrate how each of these can...

There are five different levels of regional trade agreements – demonstrate how each of these can work in practice.

please do it in the word form not any picture or any other type and mention references and it should be of approximately 500 words

thanku

In: Economics

Explain how technology can be used to address one specific misconception in secondary-level geometry. (When thinking...

Explain how technology can be used to address one specific misconception in secondary-level geometry. (When thinking of a misconception, you want to mention something specific within a geometry course where a student may make an error).

In: Advanced Math

Summarize the nonconventional monetary policy tools newly introduced by the Federal Reserve in response to the...

Summarize the nonconventional monetary policy tools newly introduced by the Federal Reserve in response to the economic conditions of the COVID-19 pandemic. Discuss some additional steps the Fed could pursue and mention any potential disadvantages associated with each.

In: Finance

what is Maxwell’s Equations, list and name , write in details, mention the mathematical forms and...

what is Maxwell’s Equations, list and name , write in details, mention the mathematical forms and in physics form, then explian them by physics? and name and explain any symbols like: B € Q

please make ur hand writing clear

In: Advanced Math

what is Maxwell’s Equations, list and name , write in details, mention the mathematical forms and...

what is Maxwell’s Equations, list and name , write in details, mention the mathematical forms and in physics form, then explian them by physics? and name and explain any symbols like: B € Q

please make ur hand writing clear

In: Physics

The entire managerial economics revolve around what to produce, how to produce. Mention the company where...

The entire managerial economics revolve around what to produce, how to produce. Mention the company where you are working (if you are not currently working consider you potential employer) and give appropriate example and explanations to support the aforementioned statement.

In: Economics

Instruction: What is Unemployment Rate and what are the factors that cause the UR to increase...

Instruction:

What is Unemployment Rate and what are the factors that cause the UR to increase or decrease?

Do your own research. Write one page to define the Unemployment Rate and explain the factors affecting the UR. (Mention your reference at the end)

In: Economics

Giving a feedback can be a make or a break tool in the manager employee relationship....

Giving a feedback can be a make or a break tool in the manager employee relationship. In 400 - 600 words explain how a manager can make this process a make relationship. Mention the Do’s and the Don’ts that a manager should follow during this process.

In: Operations Management