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
pantera1 [17]
3 years ago
6

Answer any one: write a computer program:which you know.​

Computers and Technology
1 answer:
zhenek [66]3 years ago
3 0

hope this helps you.look it once

You might be interested in
Both Wireshark and NetWitness Investigator can be used for packet captures and analysis. Which tool is preferred for each task,
NikAS [45]

Answer:

  • <u>packet capture best suited for Wireshark </u>
  • <u>packet analysis best suited for Netwiness</u>

Explanation:

Although both software packages can carry out each task, however, expert network administrators have noted that in terms of effectiveness, the Wireshark software application is best suited for packet capture since unlike Netwitness has no limitation on the size of files it can capture.

Whereas, because Netwitness has a capacity of up to seven-layer protocol analysis, it can perform a more detailed analysis of packets.

5 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
ONLY ANSWER IF YOU KNOW HOW TO WRITE THIS CODE
denis-greek [22]

Answer:

WRITE THIS CODE

WRITE

WRITE

8 0
3 years ago
Read 2 more answers
Which of the following is an attack that adds SQL statements to input data for the purpose of sending commands to a database man
liq [111]

Answer: SQL Injection

Explanation:

The SQL injection is one of the type of attack which is used in the database management system for sending the commands by adding the structured query (SQL) language statement in the form of input data.

  • The SQL injection is the technique of code injection in which the SQL statement for the purpose of sending commands.  
  • It is widely used in the data driven applications.
  • The various types of web applications and web pages are used the SQL injection and uses in the form of input in the SQL query and then it is executed in the database.

Therefore, The SQL injection is the correct option.

5 0
3 years ago
What is software? what are two types of software?​
mel-nik [20]
Software is the programs and other operating information used by a computer. Two types of software are system software and Application software. Hope this helps :)
3 0
3 years ago
Other questions:
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
    8·1 answer
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    9·2 answers
  • 11What is the definition of bandwidth? the speed at which bits travel on the network the measure of the transfer of bits across
    7·1 answer
  • What is the maximum rate at which computers A and B can communicate, via router X? (your answer should be in Mbps)
    12·1 answer
  • which of the following is not a windows accessory? a. sticky notes b. windows 8 c. sound recorder or d. paint
    8·2 answers
  • Technologies have advanced to allow computer chips to be placed in almost anything and to be connected to a network almost anywh
    8·1 answer
  • How to change the date modified on a word document?
    11·1 answer
  • Scenes for films are almost always filmed in the same sequence they appear in the script.
    14·1 answer
  • 1) If a robot has a 3 bit instruction set and needs 20 instructions to reach its destination, how many bits of memory are requir
    5·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!