Giter Site home page Giter Site logo

cosc1430_exercise2's Introduction

COSC1430_Exercise2

Given the Shape2D class (see the provided Shape2D.h), implement a derived class, named Rectangle with the following additional members:

Two private member variables, width and height (both are float)

The corresponding accessors and mutators to access and modify the above two private member variables:

  float getWidth();
  float getHeight();
  void setWidth(float );
  void setHeight(float );

A public function to compute and the area of a rectangle and set the area to the variable area inherited from Shape2D:

  void compArea();

Implement the above Rectangle class correctly to pass the unit tests.

Also, please fix the provided main() function so that it can compile and run properly.

cosc1430_exercise2's People

Contributors

ohaluminum avatar

Watchers

 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.