Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming 2 - Lab 1 Description You are going to write a program which creates vehicles. You will get input from the user about the

image text in transcribedimage text in transcribedimage text in transcribed

Programming 2 - Lab 1 Description You are going to write a program which creates vehicles. You will get input from the user about the vehicle's make, model, year, and number of passengers. Then you will add the vehicle to an array. You will also need to be able to loop over the array and display the vehicle information TOPICS COVERED Classes, user input, arrays, range checking, error handling, unit tests Project Setup: Create a C# console application Add a C# Class Library to the solution . o Add a reference in the console project to the C# class library project o Create your classes in your class library Add a Unit Test Project (.NET Framework) to your solution . Add a reference in the unit test project to the C# class library project Create unit tests in your Unit test project. o To add a project to an existing solution, right-click on your solution in the Solution Explorer window, and then click Add->New Project. Part One - The Vehicle Class You will need to create a vehicle A Vehicle class o Properties year " make (Ford, Dodge, Mazda, etc) " model (Miata, Jetta, Focus, etc) " number of passengers o Methods A parameterized constructor A print function to return a string with the property info. " . Example: "1988 Ford Mustang GT, 4 passengers" Programming 2 - Lab 1 Description You are going to write a program which creates vehicles. You will get input from the user about the vehicle's make, model, year, and number of passengers. Then you will add the vehicle to an array. You will also need to be able to loop over the array and display the vehicle information TOPICS COVERED Classes, user input, arrays, range checking, error handling, unit tests Project Setup: Create a C# console application Add a C# Class Library to the solution . o Add a reference in the console project to the C# class library project o Create your classes in your class library Add a Unit Test Project (.NET Framework) to your solution . Add a reference in the unit test project to the C# class library project Create unit tests in your Unit test project. o To add a project to an existing solution, right-click on your solution in the Solution Explorer window, and then click Add->New Project. Part One - The Vehicle Class You will need to create a vehicle A Vehicle class o Properties year " make (Ford, Dodge, Mazda, etc) " model (Miata, Jetta, Focus, etc) " number of passengers o Methods A parameterized constructor A print function to return a string with the property info. " . Example: "1988 Ford Mustang GT, 4 passengers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What -keto acid is formed on transamination of leucine?

Answered: 1 week ago

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago