GithubHelp home page GithubHelp logo

rackspace-questions's Introduction

Rackspace Questions

Ryan Casperson - @rbcasperson

My Answers

The Questions

1. Class Model

Using Python, please define a class model to implement the following specification:

A company has a staffing model which includes Employees, Contractors, and Temporaries. We want an object model which implements this structure. The expected behavior for the classes is documented below:

Employee:
Constructor: accepts First Name, Last Name, Pay Rate, Yearly Vacation (num days)
Public Methods: get_name - returns the employee’s name in the format “Last Name, First Name"
                get_pay_rate - returns hourly pay rate (dollars / hour)
                get_yearly_vacation - returns the amount of yearly vacation for the employee
 
Contractor:
Constructor: accepts First Name, Last Name, Pay Rate, Agency Name (Note: By policy, all contractors have 0 days of vacation)
Public Methods: get_name - returns the contractor's name in the format “Last Name, First Name [ C ]"
                get_pay_rate - returns hourly pay rate (dollars / hour)
                get_yearly_vacation - returns the amount of yearly vacation for the contractor
                get_agency - returns the name of the contracting agency that represents the contractor
 
 
Temporary:
Constructor: accepts First Name, Last Name, Pay Rate, Agency Name (Note: By policy, all temporaries have 0 days of vacation)
Public Methods: get_name - returns the contractor's name in the format “Last Name, First Name [ T ]"
                get_pay_rate - returns hourly pay rate (dollars / hour)
                get_yearly_vacation - returns the amount of yearly vacation for the temporary
                get_agency - returns the name of the temp agency that represents the temporary

2. Code Review

If you were a code reviewer, what feedback would you provide on the below function. Provide as much feedback as you can:

def CompareSwapSizeInMb(self, swap1, swap2):
    if self.OSType == "Linux":
        if swap1 < swap2:
            return False
    return True

rackspace-questions's People

Contributors

rbcasperson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.