Giter VIP home page Giter VIP logo

newstarter's Introduction

newstarter's People

Contributors

dannyhindson avatar davidfair avatar hsaunders1904 avatar martyngigg avatar owenarnold avatar pranavbahuguna avatar samtygier-stfc avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newstarter's Issues

Complete Exercise 2

Expected Behavior

Write a command line program that:

    Has classes to allow number of shapes to be defined: 
    square (side1), rectangle(side1, side2), circle(radius), triangle(height, base).
        Each shape class should know it's type ("Square"), how many sides it has.
        Each shape needs to be able to calculate it's perimeter and area. 
        For the triangle you can assume it is isoceles and the perimeter can be 
        computed using p = b + 2\sqrt{h^2+(b^2/4)}, where b is the base and h is the height.
    Within the Main method create a variety of the shapes and put them in a std::vector
    Create a class ShapeSorter which should contain four methods
        Print out the Shapes that match a chosen type
        Print out the Shapes that match a chosen number of sides
        Print out the Shapes in order of volume descending
        Print out the Shapes in order of perimeter descending

Update buildscripts & CMake

The buildscript and CMake config have become a little out of date. We need to do the following at a minimum:

  • Update standard flag to -std=c++11 in CommonSetup.cmake
  • Add the same set of compiler flags for the newstarter project as we use in mantid
  • Update buildscript.py to use Visual Studio 2015
  • Update buildscript.py to assume CMake is on the path for Windows
  • Update buildscript.py to use gcc 4.8 on RHEL6 (scl enable devtoolset-2)

Complete Exercise 2

Mantid is in desperate need of a way to store and view different shapes.

Write a command line program that:

  1. Has classes to allow number of shapes to be defined: square (side1), rectangle(side1, side2), circle(radius), triangle(height, base).
    1. Each shape class should know it's type ("Square"), how many sides it has.
    2. Each shape needs to be able to calculate it's perimeter and area. For the triangle you can assume it is isoceles and the perimeter can be computed using p = b + 2\sqrt{h^2+(b^2/4)}, where b is the base and h is the height.
  2. Within the Main method create a variety of the shapes and put them in a std::vector
  3. Create a class ShapeSorter which should contain four methods
    1. Print out the Shapes that match a chosen type
    2. Print out the Shapes that match a chosen number of sides
    3. Print out the Shapes in order of volume descending
    4. Print out the Shapes in order of perimeter descending

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.