SlideShare a Scribd company logo
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)
        {

         }
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]
        }
    }
}

More Related Content

PDF
C# Programming Help
PPTX
Cs 8351 dpsd-hdl
PDF
Lesson 5.2 logical operators
PDF
Abap 7 02 new features - new string functions
PDF
Lesson 9.2 guessing the game program
PPT
Flex 4 tips
C# Programming Help
Cs 8351 dpsd-hdl
Lesson 5.2 logical operators
Abap 7 02 new features - new string functions
Lesson 9.2 guessing the game program
Flex 4 tips

What's hot (11)

PPTX
Manipulators in c++
PDF
Lesson 7.2 using counters and accumulators
PDF
Lesson 6.2 logic error
PPTX
Car Parking System
DOCX
ECO 550 week 4 chapter 7 and chapter 8 problems
PDF
PROGRAMSc
PDF
openCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
PPTX
Manipulators
PDF
R Data Visualization Tutorial: Bar Plots
PDF
Manipulators
PDF
Traduccion a ensamblador
Manipulators in c++
Lesson 7.2 using counters and accumulators
Lesson 6.2 logic error
Car Parking System
ECO 550 week 4 chapter 7 and chapter 8 problems
PROGRAMSc
openCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
Manipulators
R Data Visualization Tutorial: Bar Plots
Manipulators
Traduccion a ensamblador
Ad

Similar to Software Engineer Screening Question - OOP (20)

PDF
For the following questions, you will implement the data structure to.pdf
PDF
(7) cpp abstractions inheritance_part_ii
DOCX
#include iostream #include string #include fstream std.docx
DOCX
#include iostream #include string#includeiomanip using.docx
PDF
C#i need help creating the instance of stream reader to read from .pdf
DOCX
#include iostream#include string#include iomanip#inclu.docx
PDF
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
DOCX
Parking Ticket SimulatorFor this assignment you will design a se.docx
PDF
This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf
PDF
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
PDF
Itsjustangular
PDF
(5) c sharp introduction_object_orientation_part_ii
PDF
Protocol-Oriented Programming in Swift
DOCX
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
PDF
(9) cpp abstractions separated_compilation_and_binding_part_ii
PDF
Goal The goal of this assignment is to help students understand the.pdf
PPTX
Classes and Objects In C# With Example
PDF
Java doc Pr ITM2
PPTX
Jan 2017 - a web of applications (angular 2)
PDF
#includeiostream #includecmath #includestringusing na.pdf
For the following questions, you will implement the data structure to.pdf
(7) cpp abstractions inheritance_part_ii
#include iostream #include string #include fstream std.docx
#include iostream #include string#includeiomanip using.docx
C#i need help creating the instance of stream reader to read from .pdf
#include iostream#include string#include iomanip#inclu.docx
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
Parking Ticket SimulatorFor this assignment you will design a se.docx
This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
Itsjustangular
(5) c sharp introduction_object_orientation_part_ii
Protocol-Oriented Programming in Swift
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
(9) cpp abstractions separated_compilation_and_binding_part_ii
Goal The goal of this assignment is to help students understand the.pdf
Classes and Objects In C# With Example
Java doc Pr ITM2
Jan 2017 - a web of applications (angular 2)
#includeiostream #includecmath #includestringusing na.pdf
Ad

Software Engineer Screening Question - OOP

  • 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] } } }