Assignment 05

Computer Exercise 1

The Fibonacci series:     0,1,1,2,3,5,8,13,21,....
begins with 0 and 1 and has the property that each subsequent Fibonacci number is the sum of the previous two Fibonacci numbers. Write:
 

 

  Information: The series occurs in nature, few examples are the following:

 

 

Computer Exercise 2

The circle class

In a graphics program, very often there is a need to represent geometric objects, for example: square, ellipsis, triangle, etc. There is a need not only to position them accurately on the screen, not only to draw them and move them around the screen, but we also need to know and display their characteristics / attributes. For this programming assignment you will implement the circle class, where the attributes (data members) should be the following:

The user should enter the x_coord, y_coord and radius attributes initially (from stdin). The member functions for the circle class should be the following:

In order to check your circle class, write a circle_driver.cpp program, where you call all the member functions listed above in the same order.

*** In your program, please use the names that i suggested above for both (data members and member functions), name your . cpp file as circle_driver.cpp and create an object of type circle, with a name the_circle.