Giter Site home page Giter Site logo

carversion3's Introduction

CarVersion3

Exercise 13

Download the C# project CarVersion3 from the class website. This exercise is only about observing how we can use if-state-ments to implement some business logic. The solution contains a class called Car, in the file Car.cs.

There are three methods in the Car class that use if-statements:

  • IsEconomic
  • IsFamilyCar
  • RentalPricePerDay
  1. For each of these three methods, make sure you understand what the possible return values are, and under what circumstances each value can be returned.

  2. Read the code in InsertCodeHere.cs – it tests the Car class. Before running the program, try to predict the outcome.

  3. Run the program, and check that the outcome is as you predicted. If not, you may need to read the Car class code again

  4. Try to change some of the values used when creating the three Car objects, and see if you can predict the outcome of running the program

carversion3's People

Contributors

martinkierkegaard avatar

Watchers

James Cloos avatar Natascha Jakobsen 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.