SlideShare a Scribd company logo
1 of 2
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

What's hot

Manipulators in c++
Manipulators in c++Manipulators in c++
Manipulators in c++Ashok Raj
 
ECO 550 week 4 chapter 7 and chapter 8 problems
ECO 550 week 4 chapter 7 and chapter 8 problemsECO 550 week 4 chapter 7 and chapter 8 problems
ECO 550 week 4 chapter 7 and chapter 8 problemshwguiders4po2
 
openCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
openCypher: Adding Property Graph Extensions to SQL Using Graph Query ProceduresopenCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
openCypher: Adding Property Graph Extensions to SQL Using Graph Query ProceduresopenCypher
 
R Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar PlotsR Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar PlotsRsquared Academy
 
Traduccion a ensamblador
Traduccion a ensambladorTraduccion a ensamblador
Traduccion a ensambladortre_na_gil
 

What's hot (11)

Manipulators in c++
Manipulators in c++Manipulators in c++
Manipulators in c++
 
Lesson 7.2 using counters and accumulators
Lesson 7.2 using counters and accumulatorsLesson 7.2 using counters and accumulators
Lesson 7.2 using counters and accumulators
 
Lesson 6.2 logic error
Lesson  6.2 logic errorLesson  6.2 logic error
Lesson 6.2 logic error
 
Car Parking System
Car Parking SystemCar Parking System
Car Parking System
 
ECO 550 week 4 chapter 7 and chapter 8 problems
ECO 550 week 4 chapter 7 and chapter 8 problemsECO 550 week 4 chapter 7 and chapter 8 problems
ECO 550 week 4 chapter 7 and chapter 8 problems
 
PROGRAMSc
PROGRAMScPROGRAMSc
PROGRAMSc
 
openCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
openCypher: Adding Property Graph Extensions to SQL Using Graph Query ProceduresopenCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
openCypher: Adding Property Graph Extensions to SQL Using Graph Query Procedures
 
Manipulators
ManipulatorsManipulators
Manipulators
 
R Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar PlotsR Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar Plots
 
Manipulators
ManipulatorsManipulators
Manipulators
 
Traduccion a ensamblador
Traduccion a ensambladorTraduccion a ensamblador
Traduccion a ensamblador
 

Similar to Software Engineer Screening Question - OOP

For the following questions, you will implement the data structure to.pdf
For the following questions, you will implement the data structure to.pdfFor the following questions, you will implement the data structure to.pdf
For the following questions, you will implement the data structure to.pdfarjunhassan8
 
(7) cpp abstractions inheritance_part_ii
(7) cpp abstractions inheritance_part_ii(7) cpp abstractions inheritance_part_ii
(7) cpp abstractions inheritance_part_iiNico Ludwig
 
#include iostream #include string #include fstream std.docx
#include iostream #include string #include fstream  std.docx#include iostream #include string #include fstream  std.docx
#include iostream #include string #include fstream std.docxajoy21
 
#include iostream #include string#includeiomanip using.docx
#include iostream #include string#includeiomanip using.docx#include iostream #include string#includeiomanip using.docx
#include iostream #include string#includeiomanip using.docxajoy21
 
C#i need help creating the instance of stream reader to read from .pdf
C#i need help creating the instance of stream reader to read from .pdfC#i need help creating the instance of stream reader to read from .pdf
C#i need help creating the instance of stream reader to read from .pdfajantha11
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docxmayank272369
 
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdfAssignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdffasttrackscardecors
 
Parking Ticket SimulatorFor this assignment you will design a se.docx
Parking Ticket SimulatorFor this assignment you will design a se.docxParking Ticket SimulatorFor this assignment you will design a se.docx
Parking Ticket SimulatorFor this assignment you will design a se.docxdanhaley45372
 
This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf
This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdfThis is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf
This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdfbharatchawla141
 
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdfONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdfvinodagrawal6699
 
(5) c sharp introduction_object_orientation_part_ii
(5) c sharp introduction_object_orientation_part_ii(5) c sharp introduction_object_orientation_part_ii
(5) c sharp introduction_object_orientation_part_iiNico Ludwig
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftOleksandr Stepanov
 
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docxCOIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docxclarebernice
 
(9) cpp abstractions separated_compilation_and_binding_part_ii
(9) cpp abstractions separated_compilation_and_binding_part_ii(9) cpp abstractions separated_compilation_and_binding_part_ii
(9) cpp abstractions separated_compilation_and_binding_part_iiNico Ludwig
 
Goal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdfGoal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdfarsmobiles
 
Classes and Objects In C# With Example
Classes and Objects In C# With ExampleClasses and Objects In C# With Example
Classes and Objects In C# With ExampleCheezy Code
 
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)Kasper Reijnders
 
#includeiostream #includecmath #includestringusing na.pdf
 #includeiostream #includecmath #includestringusing na.pdf #includeiostream #includecmath #includestringusing na.pdf
#includeiostream #includecmath #includestringusing na.pdfanuradhaartjwellery
 

Similar to Software Engineer Screening Question - OOP (20)

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

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