Question: a public method with name book with a string for the renting person as first parameter, a date of type DayOfYear as second parameter for
a public method with name book with a string for the renting person as first parameter, a date of type DayOfYear as second parameter for the start day of the rental, an integer number of days as third parameters, how long the rental is planned, and a floating point return value. In the body a new object of type Rental on the heap shall be generated and its address being stored in array year for each rental day in a loop (the index into the array for the start day of the rental can be calculated by sending a message get_dayOfYear() to the date object - don't forget to subtract 1). Return value shall be the price for this rental determined by a message get_price sent to the vehicle.
(c++)
CMakelists TUUSTO YESUGATI VICIUS VICACE.YELEYIMIMILI D 218 219 228 221 222 223 224 225 226 227 228 229 }; class Schedule private: Vehicle vehicle; Rental* year(365): Schedule next; public: 1/a public constructor with a single parameter of type pointer to a vehicl l/Pointer next and all pointers in array year shall be set to null pointer Schedule (Vehicle vehicles nullptr) () 230 232 233 234 235 236 237 238 I Vehicle* get_vehicle() return this->vehicle; } Schedule get_next(){ return this->next; } 1/7 void set.next(Schedule* nxt) { this->next = nxt; } bool 239 240 241 242 243 246 245 246 247 248 249 0 258 //8 //a public method with name isfree with a date of type DayOf Year as first p 1/planned rental, an integer number of days as second parameter, how long t 1/Boolen return value. In the body it shall be checked whether the whole ti DayOfYear is_tree(DayOfYear from, int days) { 251 252 253 254 255 256 257 258 259 268 761 } 779 string Book (string customer DayOf Year from) { Rental *ri(365); 1/18 svold print (DayOfYear fron) { car } Schedule main TODO CMakelists TUUSTO YESUGATI VICIUS VICACE.YELEYIMIMILI D 218 219 228 221 222 223 224 225 226 227 228 229 }; class Schedule private: Vehicle vehicle; Rental* year(365): Schedule next; public: 1/a public constructor with a single parameter of type pointer to a vehicl l/Pointer next and all pointers in array year shall be set to null pointer Schedule (Vehicle vehicles nullptr) () 230 232 233 234 235 236 237 238 I Vehicle* get_vehicle() return this->vehicle; } Schedule get_next(){ return this->next; } 1/7 void set.next(Schedule* nxt) { this->next = nxt; } bool 239 240 241 242 243 246 245 246 247 248 249 0 258 //8 //a public method with name isfree with a date of type DayOf Year as first p 1/planned rental, an integer number of days as second parameter, how long t 1/Boolen return value. In the body it shall be checked whether the whole ti DayOfYear is_tree(DayOfYear from, int days) { 251 252 253 254 255 256 257 258 259 268 761 } 779 string Book (string customer DayOf Year from) { Rental *ri(365); 1/18 svold print (DayOfYear fron) { car } Schedule main TODO
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
