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
Gekata [30.6K]
3 years ago
12

Design a class named Car that has the following fields:

Computers and Technology
1 answer:
Archy [21]3 years ago
3 0

Answer:

public  class Car {

   private int yearModel;

   private String make;

   private int speed;

   

   public Car(){

       yearModel = 2000;

       make = "Nissan";

       speed = 4;

   }

   

   public Car(int yearModel, String make, int speed) {

       this.yearModel = yearModel;

       this.make = make;

       this.speed =speed;

   }

   

   public void setYearModel(int yearModel){

       this.yearModel = yearModel;

   }

   public void setMake(String make){

       this.make = make;

   }

   public void setSpeed(int speed){

       this.speed = speed;

   }

   

   public int getYearModel(){ return yearModel; }

   public String getMake(){ return make; }

   public int getSpeed(){ return speed; }

   

   public String toString(){

       return "Car's year model: " + getYearModel() + ", make: " + getMake() + ", speed: " + getSpeed();

   }

}

Explanation:

<em>Variables</em> are declared.

<em>No-arg constructor</em> is created with default values.

<em>A constructor with parameters</em> is created.

The required <em>set methods</em> and <em>get methods</em> are created.

<em>toString</em> method is created to return car's specifications.

You might be interested in
Site won't let me log in and is glitching? Is rainly down?
yarga [219]

Answer: Somewhat.

Explanation: Try refreshing your pages, or reopening your browser.

3 0
3 years ago
Read 2 more answers
Business intelligence is gained through industrial espionage and the gathering of this information often includes illegal or une
Nataly [62]

Answer:

A) True

Explanation:

Industrial espionage utilizes both illegal and unethical methods in gathering information about a corporate organization in order to get business intelligence. This involves stealing intellectual property and trade secrets to use them for a competitive advantage.  because Information about company's products, services, finances, sales, etc can be toold for  economic warfare

3 0
4 years ago
What is the HTML tag used to define a block of content?<br> O <br> O class<br> O #id<br> O
allsm [11]
Are there any other options
7 0
3 years ago
Read 2 more answers
true or false? in a known-plaintext attack (kpa), the cryptanalyst hs access only to a segment of encrpted data and has no choic
bulgar [2K]

Yes , it’s true. In a known-plaintext attack (kpa), the cryptanalyst can only view a small portion of encrypted data, and he or she has no control over what that data might be.

The attacker also has access to one or more pairs of plaintext/ciphertext in a Known Plaintext Attack (KPA). Specifically, consider the scenario where key and plaintext were used to derive the ciphertext (either of which the attacker is trying to find). The attacker is also aware of what are the locations of the output from key encrypting. That is, the assailant is aware of a pair. They might be familiar with further pairings (obtained with the same key).

A straightforward illustration would be if the unencrypted messages had a set expiration date after which they would become publicly available. such as the location of a planned public event. The coordinates are encrypted and kept secret prior to the event. But when the incident occurs, the attacker has discovered the value of the coordinates /plaintext while the coordinates were decrypted (without knowing the key).

In general, a cipher is easier to break the more plaintext/ciphertext pairs that are known.

To learn more about Plaintext Attack click here:

brainly.com/question/28445346

#SPJ4

6 0
1 year ago
In a _____ network, each device on the network is attached to a central router. If the router fails, then the other devices will
Damm [24]

Answer:

In a STAR TOPOLOGY network, each device on the network is attached to a central router. If the router fails, then the other devices will be unable to communicate, but if only one connected device fails, then all other devices will still be able to communicate.

Explanation:

In this type of topology all the computers are connected to a single router through a cable. This router is the central node and all others nodes are connected to the central node.

7 0
3 years ago
Other questions:
  • The only requirement of __________ is that the sender must provide some mechanism whereby the receiver can opt out of future ema
    14·1 answer
  • What is the part of the browser window that displays the content of the web page such as pictures and text called?
    10·1 answer
  • Numeric data is stored in what for direct processing
    5·1 answer
  • Bytes are typically represented with a lowercase b and bits with an uppercase B.<br> true or false
    7·1 answer
  • Machu Picchu is located in modern day _______<br><br>​
    14·2 answers
  • 1024 Megabytes = ____________
    14·1 answer
  • What is a conditional Statement that causes the program to change its course​
    11·1 answer
  • Shane is working on a new project for the sales department. The company wants a way to allow the sales force to print orders at
    5·1 answer
  • jeff has just upgraded from windows 7 to windows 10 and he is confused. He has started several universal apps but he can't figur
    11·1 answer
  • Which word describes an important characteristic of good computer
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!