Consider the following code snippet: public class Vehicle { private String type; private int numAxles; public Vehicle(String vehicleType, int VehicleAxles) { . . . } public Vehicle(String vehicleType) { . . . } } What is wrong with this code?

Answers

Answer 1
Answer:

Answer:

class Vehicle

{

private:             //should be declared once

string type;      //should be small as C++ is case sensitive

int numAxles;  

public:             //should be declared once

Vehicle ( string vehicleTypes, int VehicleAxles);    \\s should be small as C++ is        case sensitive and it is a parametarised constructor  

Vehicle (string vehicleType, int b);    //s should be small as C++ is case sensitive and now this is also a parametarised constructor

};        //a class ends with }: not with }

Explanation:

There are two constructors in this piece of code. The first constructor was parametrised while the second only had one argument. The second constructor should have 2 arguments like the first construtor or it should be empty. I've passed another argument to the second constructor. Moreover, the class ends with }; not with } and as we know C++ is case sensitive language so, declare the reserved keywords with small letters.


Related Questions

Which of the following is the last step in creating a budget?A. Determine savings or debt C. Identify fixed expenses D. Identify variable expenses
Di bawah ini tampilan submenu pada tab menu insert pada microsoft word 2010,yaitu...A.tables C.paragraph B.font D.styles
Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Roman numeral version of that number. Input Validation: Do not accept a number less than 1 or greater than 10.
Which of the following expressions will produce a valid random integer between the int values m and n inclusive, where m < n?
What happens if a factor analysis item doesn't load on pattern matrix in SPSS?

Who played a major role in the changing religious identity of the chiefs and their followers in Melanesia and Polynesia?

Answers

The answer is the Christian Missionaries.

They are the one who had the major role in transforming the religions of the chiefs and their followers in Melanesia and Polynesia. Christian Missionaries are the disciples and followers of Jesus Christ. They came from place to place to spread the word of God and evangelize the people.

after inputting a formula or a piece of data into a cell, what happens to the cell pointer when you press Enter?

Answers

After inputting a formula or a piece of data into a cell, the cell pointer goes down to the next cell directly below it when you press Enter. It automatically directs you to input the data in the next cell downwards and not sidewards.

What is the name of the file that holds the 1's and 0's code for the CPU to execute/run?

Answers

The answer is binary file
Hope it helps<3

According to the Center for 21st Century Skills, what are three critical skills that modern employers look for in employees?A. Programming, presentations, and privileges
B. Social media, status updates, and search expertise
C. Fundamentals, frameworks, and finances
D. Collaboration, communication, and creativity

Answers

Answer:

D. Collaboration, communication, and creativity.

Explanation:

Today, modern jobs require teamwork, strong communication and creativity. This can be generally stated for almost all jobs because of the collaborative structure of modern workplaces.

Moreover, if you look closely, the other three options are rather specific. A. has programming in it. Imagine, asking a painter to learn programming to get a job in their field. It just sounds absurd. Similarly, in B., what do status updates have to do with the professional aspects of jobs in GENERAL. Sure, if you handle Taylor Swift's twitter account, it may be useful. But not for jobs in general. Carrying with the logic in C., the argument is the same. Why would the knowledge of finances and framework be involved in say, a graphic designing job.

If I'm not mistaken, It's D. Modern employers, or most of them, want multi-collaborative workers with different cultural aspects and what not, including cross-cultural communication and a creative mind set. Hope this helps.. :)

A student is recording a song on her computer. When the recording is finished, she saves a copy on her computer. The student notices that the saved copy is of lower sound quality than the original recording. Which of the following could be a possible explanation for the difference in sound quality?A. The song was saved using fewer bits per second than the original song.
B. The song was saved using more bits per second than the original song.
C. The song was saved using a lossless compression technique.
D. Some information is lost every time a file is saved from one location on a computer to another location.

Answers

Answer:

A. The song was saved using fewer bits per second than the original song.

Explanation:

A song can be recorded on the computer or any device ranging from bit rates 96 kbps to 320 kbps.  

The lesser the bitrates the lesser the quality of the audio and when we increase the bit rates, the quality of the audio recorded gradually increases.

Bitrates of 128 kbps give us a radio like quality whereas when we use bitrates of 320 kbps we get very good or CD-like quality.

According to the scenario, the most appropriate answer is option A.

Mass Media does not play a large role in American society. Please select the best answer from the choices provideda. True
b. False

Answers

Answer:

False

Explanation:

F on edge

Answer:

false on edge 2022

Explanation: