1. Question #1:
Part I: Imagine you are working on a SimCity like game where real-world objects are modeled as software objects. Using OOP best practices,
implement the constructor, the Park() method and the UnPark() methods in the ParkingStructure object. Make sure you complete the method
declaration with proper return types and proper input parameters.
Part II: Implement the GetCarMakeCount() method that returns a list of MakeCount objects each representing a car make and the count of cars
of that make in the parking structure. The list of MakeCount objects should be sorted in descending order of the make with the highest count
first.
using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
namespaceScoreBig.Game.Automotive
{
publicclassCar
{
publicstring Make;
// Include additional properties here.
}
publicclassMakeCount
{
publicstring Make;
publicint Count;
// Include additional properties here.
}
publicclassParkingStructure
{
// Include additional private variables here.
publicParkingStructure(?) //Please specify the input parameter(s)
{
}
2. public ?Park(Car car) //Please specify the return type
{
//Implement this method.
}
publicCarUnPark(?) //Please specify the input parameter(s)
{
//Implement this method.
}
public List<MakeCount>GetCarMakeCount()
{
//Implement this method so a tally of all car makes in the parking structure are returned in a descending order.
// Example:
// [Honda,5]
// [BMW,4]
// [Ford,2]
// [Lexus,1]
}
}
}