Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started