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
olga_2 [115]
3 years ago
6

When looking through the documentation for a specific class, you never actually see the source code for that class. Instead, you

see an interface for that class with descriptions of what all of the constructors and methods do. This is a real-world example of what concept
Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
5 0

Answer:

Answer is abstraction.

Refer below.

Explanation:

When looking through the documentation for a specific class, you never actually see the source code for that class. Instead, you see an interface for that class with descriptions of what all of the constructors and methods do. This is a real-world example of abstraction.

You might be interested in
Huffman trees use the _________ of each character to work out their encoding. A) Frequency B) Order in ASCll
Maurinko [17]
I think the answer is C but I could be wrong
5 0
3 years ago
Could somebody please find the bugs and amend them? This question is worth 25 Brainly points!
Andreyy89

line 4

if salary < 30000

error missing ":"

solution

if salary < 30000:

line 6

tax = salary * 0.2

error is missing identifier for tax

solution add identifier for tax on line 3

tax = 0.0

line 11

error syntax

solution is move tax = salary * 0.4 + 6000 to the right

tax = salary * 0.4 + 6000

6 0
3 years ago
Johnny is a member of the hacking group Orpheus1. He is currently working on breaking into the Department of Defense's front end
sweet [91]

Answer:

RainbowTables

Explanation:

RainbowTables is the best option when the cracker has limited time.

6 0
3 years ago
8. What is the correct jQuery code to set the background color of all p elements to red?
pickupchik [31]
The correct anwers is the letter b.)
3 0
3 years ago
Use BlueJ to write a program that reads a sequence of data for several car objects from an input file. It stores the data in an
vaieri [72.5K]

Answer:

Java code is explained below

Explanation:

// Car.java

import java.util.Calendar;

public class Car {

  private String vin;

  private String make;

  private String model;

  private double cost;

  private int year;

  public Car(String vin, String make, String model, double cost, int year) {

      this.vin = vin;

      this.make = make;

      this.model = model;

      this.cost = cost;

      this.year = year;

  }

  public String getModel() {

      return model;

  }

  public double getCost() // returns car’s cost

  {

      return cost;

  }

  public String getMake() // returns car’s make

  {

      return make;

  }

  public boolean isExpensive() // returns true if car has cost above 30000 and

                                  // false

  // otherwise

  {

      if (cost > 30000)

          return true;

      else

          return false;

  }

  public boolean isAntique() // returns true if car’s has above 50 years, and

                              // false

  // otherwise

  {

      int cyear = Calendar.getInstance().get(Calendar.YEAR);

      if ((cyear-year) > 50)

          return true;

      else

          return false;

  }

  public String toString() // returns string with all car’s data in one line

  // separated by tabs.

  {

      return vin + "\t" + make + "\t" + model + " " + cost + "\t" + year;

  }

}

___________________________

// CarList.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.ArrayList;

import java.util.Scanner;

public class CarList {

  private ArrayList<Car> type;

  public CarList() throws FileNotFoundException {

      this.type = new ArrayList<Car>();

      Scanner sc1 = new Scanner(new File("inData.txt"));

      while (sc1.hasNextLine()) {

          String str = sc1.nextLine();

          String arr[] = str.split(" ");

          type.add(new Car(arr[0], arr[1], arr[2], Integer.parseInt(arr[3]),

                  Integer.parseInt(arr[4])));

      }

      sc1.close();

  }

 

  public void printList()

  {

      System.out.println("Displaying cars:");

      for(int i=0;i<type.size();i++)

      {

          System.out.println(type.get(i));

      }

  }

  public void printExpensiveCars()

  {

     

      System.out.println("List of expensive cars:");

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).isExpensive())

          {

              System.out.println(type.get(i));

          }

      }

  }

 

  public Car cheapestCar()

  {

      int cheapIndx=0;

      double min=type.get(0).getCost();

      for(int i=0;i<type.size();i++)

      {

      if(min>type.get(i).getCost())

      {

          min=type.get(i).getCost();

          cheapIndx=i;

      }

      }

      return type.get(cheapIndx);

  }

  public int countCarsWithModel(String model)

  {

      int cnt=0;

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).getModel().equals(model))

          {

              cnt++;

          }

      }

      return cnt;

  }

 

  public ArrayList<Car> antiqueCarList ()

  {

      ArrayList<Car> arl=new ArrayList<Car>();

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).isAntique())

          arl.add(type.get(i));

      }

      return arl;

  }

}

_________________________________

// TestCarList.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.ArrayList;

import java.util.Scanner;

public class TestCarList {

  public static void main(String[] args) throws FileNotFoundException {

      CarList cl = new CarList();

      cl.printList();

      cl.printExpensiveCars();

      ArrayList arl = cl.antiqueCarList();

      System.out.println("Displaying the AntiqueCar list:");

      for (int i = 0; i < arl.size(); i++) {

          System.out.println(arl.get(i));

      }

      System.out.println("Displaying the cheapest car :");

      System.out.println(cl.cheapestCar());

      System.out.println("No of Royal model Cars :"+ cl.countCarsWithModel("Royal"));

  }

}

____________________________

Output:

Displaying cars:

1234567CS2   Subaru   Impreza 27000.0   2017

1233219CS2   Toyota   Camry 31000.0   2010

9876543CS2   Ford   Mustang 51000.0   1968

3456789CS2   Toyota   Tercel 20000.0   2004

4567890CS2   Crysler   Royal 11000.0   1951

List of expensive cars:

1233219CS2   Toyota   Camry 31000.0   2010

9876543CS2   Ford   Mustang 51000.0   1968

Displaying the AntiqueCar list:

9876543CS2   Ford   Mustang 51000.0   1968

4567890CS2   Crysler   Royal 11000.0   1951

Displaying the cheapest car :

4567890CS2   Crysler   Royal 11000.0   1951

No of Royal model Cars :1

3 0
3 years ago
Other questions:
  • To join two or more objects to make a larger whole is to _____________ them.
    8·2 answers
  • Which routine is configured to be called by another routine?
    10·1 answer
  • Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
    6·1 answer
  • A user is implementing security on a small office network. Which two actions would provide the minimum security requirements for
    10·1 answer
  • Why is it important to cite your sources?
    8·2 answers
  • What is the name given a technological program that typically copies itself and moves through a computer system in order to disr
    10·1 answer
  • Can someone explain what Bytes are? I would really like to know.
    5·2 answers
  • Calculate the ERA
    6·1 answer
  • 1. What are the two main functions of an operating system?
    13·1 answer
  • Following Aristotle,man by nature is a political animal,justify the above claim in the light of the Russian invasion of Ukraine
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!