2 Ayrı dosya olarak hazırlayabilecek arkadaş var mı acaba?
C++ dan anlamıyorum da
-- BÖLÜM 1 --
Kod:
1 .Define a class named Artist with data memebers: name, countryand birthday.
(birthday can be from type string or object f class Date)
Define also the following member functions:
a: a default constructor
b: a constructor which take 3 arguments.
c: a copy constructor.
d: a destructor
e: to get each of the data members(accessors)
f: to modıfy each of the data members (mutators)
g: member function age;(),whith calculate and return age of the artist, using
his birthday .
h: operator < (by age)
i: operator=
j: to pretty-prınt the object
2. Define a subclass Film (inherit Artist ) with data members: name of the film , genre and cost
Define also the following member functions:
a) a default constructor
b) a constructor with parameters
c) member function bill(), which calculate and return bill of the tourist (days af rest* cost per day)
d) a print fuction
e) operator> (by cost)
Define a main() function, create 2 object of class Artist, find which is older. Create an array of objects of class Film, print them and find which film is most expensive, find and print all artists from fixed country (UK or others), find who plays in more films and demonstrate using of defferent member functions of the class Artist and class Film.
-- BÖLÜM 2 --
Kod:
1. Define a class named Author with data members: name, country and birthday.
(birthday can be from type or object of class Date)
Define also the following member functions:
a. a default constructor
b. a constructor which take 3 arguments
c. a copy constructor
d. a destructor
e. to get each of the data members (accessors)
f. to modify each of the data members (mutators)
g. member function year(), which calculate and return age of author,using his birthday
h. operator<(by age)
i. to pretty-print the object
2. Define a subclass Book (inherit Author) with data members: title,
year of publishing, price.
Define also the following member functions:
a) a default constructor
b) a constructor with parameters
c) a print function
d) operator> (bby price)
Define a main() function. Create 2 objects of class Author, find which is more young. Create 3 objects of class Book, print them and find which is the most expensive and demonstrate using of different member function of the class Author and class Book.