Amazon Interview Question: How would you go about design... | Glassdoor

Interview Question

Software Development Engineer I Interview Seattle, WA

How would you go about designing an university? What

  classes and methods will it have?
Tags:
software design
Answer

Interview Answer

1 Answer

0

Start thinking from department wise - lets assume you work in computer science department which just have teaching and reseach operations

Depart

{

Employment - Professers, Research Professors, student worker, graduate assistant, other staff;

Operation - building operations cost, research funding, events, misllenous

courses - types of major, minor and researcher_offered
                - Number_of_courses_offered

}

now once we have this generic skelleton class designed here we can figure out what is most common in each department

Lets say

Employment and Courses (as not each department do research)

So make abstract class on the top which everybody inherits

Class University
{
private double funding;
private string courses;
private double course_cost;

int virutal cal_funding();
int virtual cal_courses();
int virtual cal_course_cost();

}

this is abstract class inherited by all department now (pretty vauge yes object oriented)

class Computer_science inherits University
{
redefine each function here

virtual void cal_course ()
{
return - Number_of_courses_offered ;

}

This is how you can divide the problem, I am giving you skeleton but depending on discussion I can modify this to large extend, delving more into details

Harshit Pandey on May 23, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.