Sunteți pe pagina 1din 2
1 consructors (also defout destretor-core-consi sons anid ne they ovat put forsee) an ater Use BY AN (2.5p) Define 2 eustom except ico Spor aot using custom exceptions) in main to manage the 2 exceptions sn crdarce manage/pza objects creation, itis needed 2 PzzaMaker cass that has pres aynarmc array of Pizza objects (NOT posntes) fhumber of availabe plazas enerator name array of 80 chars peep heels constucors, destutor, copy constrictor, oveond operator 28 Pree rekee vesctocke (™Litti= Ttaly Teetto FereeM reel ~ teattorie.nakeri22a)"Horsn Bi2e2 Blazes = xactoria.aoketizes Piaan pieadd = Fratvorie.nakeriz+ “The makePeral) method wil create, store and return the plza only there swith the same name (0.75p for the method). is no other pizza In the trattoria fist prints all pizzes with 2 pr THICK, false, 32.5); teatvoria (20,30): trattoria 4= pizza("Wiennese”, iff! trattoria) Biitecendi) (ap) fap) Using text fe and overloading << and >> operators save and restore the watrora ‘object data (including heroes data) a new attribute that allows youto save extra topping, This « ePrice attribute. Define an argument based constructor Pizza, override itin comes at an. extend Pizza to SuperPizza by ad ce is stored in the toppin ‘one and overload <<. By defining a virtual getPrice() method in ‘of virtualization (0.5 p)- (a) ‘extra price, The extra topping prk that explicitly calls the base class. SuperPizza and exemplify in main() the advantages newone, Ne called NewPs zzatiaker that implements a STL mapsk, 95 constructor and (4p) Redefine PiazaNtaker class concept ina for the generator name, Re-implement the clas instead ofthe objects array. You can use string SOF ae = constructors (lee default, destructor satstx and WronghameEx) 30d use thes o validate input for Mahe 2 exceptions (0.9p for not Using on, its needed a HeroGonerator class that has Gray au can choose) In order to manage character cr huraber of avaitable heroes generator name ~ array of 50.chers constructor, overload operator = and (2.5p)_ implement the class constructors, destructor, copy vel “The getsuperherof) method will reate store and return the superhero only ithe generator lst with the same name (0.75p for the method). is evel + sien Superher fipeiate allt marvel: Ge) marvel marvel (3,5) e marvel object data Using binary file and overloading << and >> operators serialize and restore th (1p) {including heroes data) virtual methods called. Define the abstract class, ActionInterface, that contains 2 pure (ap) * void moveTotint X, int Y) + void attackedBy(char* heroName, int attackHitPoints) ro from Actioninterface and implement the methods simulating actions by printing console will decrease the hero hit points. Exemplify in main() Extend Superher messages. The attackedBy() method that impleme lass concept in a new one, called NewHeroGenerat You can use a string for the generator name, Re-implement the cl (1p) Redefine HoroGenerator mapck,V> instead of the pointers array. constructor and getSuperhero(). Only-compiler error free solutions are taken into account for evaluation