| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can any one help me abt this??
Option 1
a) 1) Design a class in C++ that represents complex numbers and supports important operations between them, such as, addition, subtraction, multiplication and division: a. Describe in you own words the structure of your designed class (private/public members, etc…) b. Give the semantic (meaning ) of every class feature c. How does this design support information hiding? d. Provide the header file (class declaration – complex.h) 2) Implement each member function of this class in a separate file (compleximp.cpp). 3) Write e program that uses the class Complex designed above, to work with complex number. Your program should reflect (make use of) all public members inside the designed class. b) 1) Write an application that illustrates inheritance concept by using the following classes: - Create a class called Book. Information about number of pages and operations such as set the number of pages and get the number of pages should be included. - A dictionary IS a Book. Create a second class, called Dictionary that in addition to information above, provides also information about the total number of definitions and computes the ratio: definitions/pages, sets the number of definitions to some parameter value and gets the number of definitions. - Create an application that creates references to both Book and Dictionary classes, given some number of pages and definitions received from the user. That is, the execution should look something like this, but of course you can modify it: //if a book has to be created Please enter the number of pages for the first book: 300 Number of pages in this book is 300 //if a dictionary has to be created Please enter the number of pages //Dictionary IS a book 250 Please enter the number of definitions: 2000 Number of pages: 250 Number of definitions: 5000 Definitions per page: 20 |
|
#2
|
||||
|
||||
|
Yeah, your teacher should be able to answer most questions...
We have this strange thing here about people wanting us to do their homework, you see...
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 280
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Can any one help me abt this?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|