Docstoc

SHEET8

Document Sample
SHEET8 Powered By Docstoc
					                      Arab Academy for Science & Technology

College of Engineering & Technology                College of Computer Science
Computer Engineering Department
Course : Advanced Programming                               Time : May 2006
Dr. Yasser Fouad
Eng. Mohamed Gaafar


                                    Sheet No . 8


1. Create a class point that contains private data members x,y coordinates ,
provide two constructors one default constructor and the other accepts two
parameters as the values for x and y initially , then provide a function ToString
that overrides the function ToString inherited from class object that used to
convert point to string ,then create a class circle that inherited from class point
that contains radius data member , provide two constructors and also ToString
function .


2. Create a class employee that contains data ( name , empid ) , provide
constructors , and a ToString function that overrides the ToString method . then
create a class manager that inherits from employee and has extra data like ( title of
manger ) ex ( vice president ….etc) . provide constructors and also a ToString
method to display the manger data in a neat format . then create a class scientist
that inherits from employee and has extra data ( no of publications ) .

3. Imagine a publishing company that markets both books and audiocassette
versions of its works . Create a class publication that stores the title and price of a
publication . from this class derive two classes book which adds a page count ;
and a tape class which adds a playing time in minutes . each of these three class
should have two constructors and a functions to set and get values for data
members and methods to display the data in a good format .

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:1
posted:3/13/2012
language:
pages:1
Description: c sharp exercise and assingment