code blow public class Aya {   //instantiate variables    private int ManufacturingYear;   private double EngineCapacity;   private String VehicleType;   private double Fuel_Consumption;   //create a class constructor    public Aya(int my, double ec, String vt, double fc) {     this.ManufacturingYear = my;     this.EngineCapacity = ec;     this.VehicleType = vt;     this.Fuel_Consumption = fc;   }   //create a function to print all vehicle data   public void printVehicleData() {     System.out.println("Manufacturing Year: " + ManufacturingYear);     System.out.println("Engine Capacity: " + EngineCapacity);     System.out.println("Vehicle Type: " + VehicleType);     System.out.println("Fuel Consumption: " + Fuel_Consumption);   }   //create a function to print the fuel economy   public void printFuelEconomy() {     if (Fuel_Consumption > 30) {     System.out.println("Fuel Economy: Excellent");     } else if (Fuel_Consumption >= 20 && Fuel_Consumption <= 30) {     System.out.println("Fuel Economy: Very Good");     } else if (Fuel_Consumption >= 10 && Fuel_Consumption < 20) {     System.out.println("Fuel Economy: Good");     } else if (Fuel_Consumption < 10) {     System.out.println("Fuel Economy: Average");     }   }   public static void main(String[] args) {     //create an object from Aya class     Aya a = new Aya(2022, 1.6, "Passenger Cars", 9);     //call printVehicleData function     a.printVehicleData();     //call printFuelEconomy function     a.printFuelEconomy();   } } In the main class that contains the Main function, the following is done: 1- Create an object of the previous class or class, which represents a car. 2- Assigning different values ​​to the properties of the previous object by entering the data using the input boxes (not setting them manually within the code). 3- Calling the two functions (printing vehicle data and printing fuel economy level) for the object

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

for code blow

public class Aya {
  //instantiate variables 
  private int ManufacturingYear;
  private double EngineCapacity;
  private String VehicleType;
  private double Fuel_Consumption;
  //create a class constructor 
  public Aya(int my, double ec, String vt, double fc) {
    this.ManufacturingYear = my;
    this.EngineCapacity = ec;
    this.VehicleType = vt;
    this.Fuel_Consumption = fc;
  }
  //create a function to print all vehicle data
  public void printVehicleData() {
    System.out.println("Manufacturing Year: " + ManufacturingYear);
    System.out.println("Engine Capacity: " + EngineCapacity);
    System.out.println("Vehicle Type: " + VehicleType);
    System.out.println("Fuel Consumption: " + Fuel_Consumption);
  }
  //create a function to print the fuel economy
  public void printFuelEconomy() {
    if (Fuel_Consumption > 30) {
    System.out.println("Fuel Economy: Excellent");
    } else if (Fuel_Consumption >= 20 && Fuel_Consumption <= 30) {
    System.out.println("Fuel Economy: Very Good");
    } else if (Fuel_Consumption >= 10 && Fuel_Consumption < 20) {
    System.out.println("Fuel Economy: Good");
    } else if (Fuel_Consumption < 10) {
    System.out.println("Fuel Economy: Average");
    }
  }
  public static void main(String[] args) {
    //create an object from Aya class
    Aya a = new Aya(2022, 1.6, "Passenger Cars", 9);
    //call printVehicleData function
    a.printVehicleData();
    //call printFuelEconomy function
    a.printFuelEconomy();
  }
}

In the main class that contains the Main function, the following is done:

1- Create an object of the previous class or class, which represents a car.
2- Assigning different values ​​to the properties of the previous object by entering the data using the input boxes (not setting them manually within the code).
3- Calling the two functions (printing vehicle data and printing fuel economy level) for the object.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education