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
Scorpion4ik [409]
3 years ago
13

Write the code that creates a public class named Vehicle that has one private data member. The private data member is an integer

variable named modelYear. Create two constructors: Code a constructor that has no parameters and initializes the modelYear variable to 2018. Code a constructor that has one parameter and uses that parameter value to update the modelYear variable.
Computers and Technology
1 answer:
maxonik [38]3 years ago
3 0

Answer:

Following are the program in java

public class Vehicle // class vehicle of type public

{

private int modelYear;

Vehicle() //  no parameters

{

modelYear=2018;

}

vehicle(int t)  // update the value of modelYear

{

modelYear=t;

}

public static void main(String args[]) // main function

{

vehicle ob=new vehicle();// creating instance

vehicle ob1=new vehicle(45);

}

}

Explanation:

Here we create a private data member i.e modelYear of integer type .

We create default constructor and initializes modelYear variable  with 2018.

we create a parametrized constructor  which update the value of modelYear variable.

From the main function we call both the constructors.

You might be interested in
Allie is working on the development of a web browser and wants to make sure that the browser correctly implements the Hypertext
creativ13 [48]

Answer:

The answer is "Option c"

Explanation:

The W3C is the framework for the creation of software and the online standards through which sites and webpages work, and to turn into an authoritative source of information, she will work towards getting a reliable and credible source of knowledge from the "World Wide Web Consortium", and the wrong option can be described as follows:

  • In option a, It is wrong because this organization prepares and publishes all the electronic technologies.
  • In option b, It is wrong because it is the laboratory of physics, which is not useful in web development.
  • In option d, This technology is used in TCP/IP protocol, that's why it is incorrect.
3 0
3 years ago
TV show information can either keep track of the number of viewers per show or the name of a show. Information is kept in a file
Elza [17]

Answer:

See explaination for Program source code.

Explanation:

The program source code below.

#include <iostream>

#include <fstream>

#include <vector>

using namespace std;

class Show

{

private:

string title;

int viewers;

public:

Show()

{

this->title = "";

this->viewers = 0;

}

Show(string title, int viewers)

{

this->title = title;

this->viewers = viewers;

}

string getTitle(){ return this->title; }

int getViewers(){ return this->viewers; }

};

int main()

{

vector<Show> shows;

vector<string> titles;

vector<int> viewers;

ifstream inFile1("file1.txt");

ifstream inFile2("file2.txt");

string line1, line2;

if(!inFile1.is_open() || !inFile2.is_open())

{

cout << "Either of the files could not be found!\n";

exit(0);

}

getline(inFile1, line1);

if(line1.compare("Show") == 0)

{

while(getline(inFile1, line1))

{

titles.push_back(line1);

}

inFile1.close();

}

getline(inFile2, line2);

if(line2.compare("Viewer") == 0)

{

while(getline(inFile2, line2))

{

viewers.push_back(stod(line2));

}

inFile2.close();

}

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

{

shows.push_back(Show(titles[i], viewers[i]));

}

// display all the show details

cout << "\nALL SHOWS:\n----------\n";

for(Show show : shows)

{

cout << "Title: " << show.getTitle() << ", Number of viewers: " << show.getViewers() << endl;

}

cout << endl;

return 0;

}

See attachment for output

3 0
3 years ago
_____ is the unauthorized entry into a computer system via any means
Montano1993 [528]
Hi,

The word you are looking for is "Hacking".

"Hacking is unauthorized entry into a computer system via any means."

Hope this helps.
r3t40
4 0
3 years ago
Describe all the main stress causal agents​
LekaFEV [45]

Answer:

Causes of Stress

Being unhappy in your job.

Having a heavy workload or too much responsibility.

Working long hours.

Having poor management, unclear expectations of your work, or no say in the decision-making process.

Working under dangerous conditions.

Being insecure about your chance for advancement or risk of termination.

5 0
3 years ago
When a support agent does not know the answer to a question, a good incident management strategy is to tell the user ____.
laiz [17]

When you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her.

<h3>What is incident management?</h3>

Incident management can be defined as a strategic process through which a business organization or company identifies, analyzes, and correct hazards, so as to ensure that normal service operation is restored as quickly as possible to end users after a disruption, as well as to prevent a re-occurrence of these hazards in the future.

As a support agent, if you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her at a latter time.

Read more on incident management here: brainly.com/question/11595883

4 0
2 years ago
Other questions:
  • You work for a large enterprise company that handles time-sensitive information. Your supervisor has asked that you set up a con
    8·1 answer
  • Search engines enable you to
    14·1 answer
  • a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and an academic writing style
    6·1 answer
  • A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line u
    8·2 answers
  • Give 2 examples of when spreadsheets are used.
    15·1 answer
  • Choose a film you have watched, or watch a film you have wanted to. Write a film review in at least three paragraphs. Describe w
    5·1 answer
  • David Doe is a network administrator for the ABC Company. David is passed over for promotion three times. He is quite vocal in h
    14·1 answer
  • Which network media uses different regions of the electromagnetic spectrum to transmit signals through air?
    13·1 answer
  • For Excel:
    5·1 answer
  • Rain forests clean the air by producing oxygen. Some rain forest plants have healing properties, and can be used as medicine. Ra
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!