This homework aims to help you get familiar with the fundamental C++ programming concepts.
Keywords: Constructor/Copy Constructor/Destructor, Assignment/Move, Operator Overloading, Memory Management
1Β Β Β Β Β Β Β Β Β Β Β Β Problem Definition
TL;DR: Implement the methods in the given 4 classes (Laptime, Car, Race, Championship). Cars have Laptimes, Races have Cars, Championships have Races. The details are on their way.
Another TA who watched Drive to Survive
β¦
Oh God show mercy to this boring soul.
F1 needs a new clear backbone for their visualisation system. As a Computer Engineering student from METU, they trusted you with the task. Your task is to keep track of the laptimes, cars, races and tracks. As situation requested shiny features of the latest C++ is not available to you. Therefore, you have to be careful with your programs memory management (You do not want to leave a program that is leaking memory as your legacy).
2Β Β Β Β Β Β Β Β Β Β Β Β Class Definitions
2.1Β Β Β Β Β Β Β Β Β Β Laptime
Laptime is the most basic class in this homework. Basically, itβs the node in a linked-list which would keep the time information of the laps for each Car (not the best way to keep lap times of Cars, but letβs assume F1 is not paying you anything and you let this go).
class Laptime {
private :
int laptime;
Laptime βnext;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PRIVATE METHODS/PROPERTIES BELOW
public :
/ββ β Constructor .
β
β @param intΒ Β Β Β Β Β valueΒ Β Β Β inΒ Β Β Β Β laptime .
β/
Laptime( int laptime) ;
/ββ β Copy Constructor .
β
β @param rhs The laptime to be copied .
β/
Laptime( const Laptime& rhs) ;
ΛLaptime() ;
/ββ
β Sets the next chainΒ Β Β Β Β Β Β Β Β Β Β Β forΒ Β Β Β Β Β Β this Laptime .
β You shouldΒ Β Β Β Β Β Β Β Β Β insertΒ Β Β Β the given Laptime to theΒ object which the method is βcalled upon
β
β @param next The next Laptime .
β/ void addLaptime(Laptime βnext) ;
/ββ β Less than overload .
β
β TrueΒ Β Β Β i fΒ Β Β Β Β Β Β this LaptimeΒ Β Β Β Β Β Β lessΒ Β Β Β Β Β Β Β Β Β than the rhs Laptime .
β
β @param rhs The Laptime to compare . β @return True i f this laptime is smaller , false otherwise .
β/ bool operator <(const Laptime& rhs) const ;
/ββ
β Greater than overload .
β
β TrueΒ Β Β Β i fΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β this Laptime greater than the rhs Laptime .
β
β @param rhs The Laptime to compare .
| β @return TrueΒ Β Β Β Β Β Β Β Β Β Β Β Β i fΒ Β Β Β thisΒ Β Β Β Β Β laptimeΒ Β Β Β Β Β Β Β Β is | bigger ,Β Β Β Β Β Β Β Β Β Β Β Β Β Β false | otherwise . | |
| β/ | Β | ||
| bool
/ββ |
operator >(const Laptime& rhs) | const ; | Β |
| β
β |
Plus overload | Β | Β |
| β
β |
Add two Laptime and return the | lhs Laptime | Β |
| β | @param Laptime to add | Β | Β |
| β | @returns Summation ofΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β the two laptime | Β | |
| β/
Laptime& operator+(const Laptime& rhs) ; |
|||
/ββ β Stream overload .
β
β What to stream :
β minute : second . miliseconds β
β Example :
β @important Your laptimeΒ Β Β Β Β Β Β Β Β Β Β Β variableΒ Β Β Β Β Β isΒ Β Β Β Β Β Β representationΒ Β Β Β Β Β Β Β Β Β in terms ofΒ Β Β Β Β Β Β Β Β miliseconds
β and you have to turnΒ Β Β Β Β Β Β Β Β Β Β itΒ Β Β Β toΒ Β Β Β Β Β Β Β Β desired outcome type
β Print the Laptime ofΒ Β Β Β Β Β Β Β Β Β Β theΒ Β Β Β Β Β Β Β Β Β Β Β object which the method isΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β called upon .
β @param os Stream to be used .
β @param laptime Laptime to be streamed . β @return The current Stream .
β/ friend std : : ostream& operator <<(std : : ostream& os,Β Β Β Β Β Β Β const Laptime& laptime) ;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PUBLIC METHODS/PROPERTIES BELOW
};
2.2Β Β Β Β Β Β Β Β Β Β Cars
Cars are similar to Laptimes, but they contain the name of the driver which is up to you (LeClerc can be a good start. Bahrain 2019 :/ ). It is again a node in a linked-list, but every car contains the linked-list of Laptime class (Memory Problems 2019).
class Car {
private :
std : : string driver_name;
double performance;
Laptime βhead;
Car βnext;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PRIVATE METHODS/PROPERTIES BELOW
public :
/ββ β Constructor .
β
β @Important :Β Β Β Β Β setΒ Β Β Β Β Β Β Β Β Β the performanceΒ variable ofΒ Β Β Β Β Β Β Β Β Β Β the car by usingΒ Utilizer : : βgeneratePerformance ()
β
| β @param std : : string The Car β sΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β driver name.
β/ Car(std : : string driver_name) ; |
|
| /ββ β Copy Constructor .
β |
Β |
| β @param rhs The car to be
β/ Car( const Car& rhs) ; ΛCar() ; /ββ β Gets theΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β drivers name β β β @returns :Β Β Β Β Β Β Β Β Β Β Β Β Β Β drivers name β/ |
copied . |
| std : : string getDriverName()
/ββ |
const ; |
Gets the performance
| β @returns the performance
β β/ double getPerformance()Β Β Β Β Β Β Β Β const ; /ββ β Sets the next chainΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β forΒ Β Β Β Β Β this Car . β Adds a new car behindΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β existingΒ Β Β Β Β Β car |
Β | Β | Β | Β | Β | Β |
| β You shouldΒ Β Β Β insertΒ Β Β Β the givenΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Car to upon
β Important : Car does NOT βownβ next . |
the | object | which | the method | is | called ββ |
β
β @param next The next Car .
β/ void addCar(Car βnext) ;
/ββ β Less than overload .
β
β TrueΒ Β Β Β i fΒ Β Β Β totalΒ Β Β Β Β Β laptimeΒ Β Β Β Β ofΒ Β Β Β Β Β Β Β this Car isΒ Β Β Β Β Β Β Β Β lessΒ Β Β Β Β Β Β Β Β Β than the rhs Car .
β
β Important :
β
β @param rhs The Car to compare . β @return True i f this car β s total laptime is smaller , false otherwise .
β/ bool operator <(const Car& rhs) const ;
/ββ β Greater than overload .
β
β TrueΒ Β Β Β i fΒ Β Β Β totalΒ Β Β Β Β Β laptimeΒ Β Β Β Β ofΒ Β Β Β Β Β Β Β this Car isΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β greater than the rhs Car .
β
β Important :
β
β @param rhs The Car to compare . β @return True i f this car β s total laptime is greater , false otherwise .
β/ bool operator >(const Car& rhs) const ;
/ββ β Indexing .
β
β Find the laptimeΒ Β Β Β Β Β Β Β Β ofΒ Β Β Β Β Β Β Β the given lap .
β You willΒ Β Β Β Β Β Β Β Β Β Β Β Β use 0 based indexing .
β For example , after 20 lap your car should have 20 laptimes . To get 15th βlaptime you will give 14 as the input parameter .
β
β @return The Laptime with the given lap . Laptime with zero time i f given βlap does not exists .
β/
Laptime operator [ ] ( constΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β int lap) const ;
/ββ
β Car completes one lap and recordsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β itsΒ Β Β Β Β Β laptime
β
β @Important : Based on your cars performance calculate some variance to add βaveragelaptime
β Use Utilizer : : generateLaptimeVariance ( performance ) then add it to βaveragelaptime
| β | Β | Β | Β | |||
| β @param: Car takesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β average laptimeΒ Β Β Β Β Β ofΒ Β Β Β Β Β Β the
β β/ void Lap( const Laptime& average_laptime) ; /ββ β Stream overload . β β What to stream : |
race | Β | Β | |||
| β First Three letters of the drivers surname( Capitalized )ββLatest Fastest LaptimeββTotal Laptime β Example :
β For Lewis Hamilton |
Laptimeββββ | Β | ||||
| Β | β HAMββ1:19.235ββ1:18.832ββ90:03.312
β |
Β | Β | |||
| Β | β @Important : for lap numbers smaller in size you have to put as neccasary
β @Important : you can use Laptime ostream when neccessary β β @param os Stream to be used . β @param car Car to be streamed . |
zeros | as much ββ | |||
β @return The current Stream .
β/ friend std : : ostream& operator <<(std : : ostream& os,Β Β Β Β Β Β Β const Car& car) ;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PUBLIC METHODS/PROPERTIES BELOW
};
2.3Β Β Β Β Β Β Β Β Β Β Race
Race keeps a linked-list of Cars. You have to keep your cars in the order from fastest to slowest (Nobody wants to see some randomly ordered car info). The details are in the code itself below:
class Race {
private :
std : : string race_name;
Laptime average_laptime; Car βhead;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PRIVATE METHODS/PROPERTIES BELOW
public :
/ββ β Constructor .
β
β @Important : Generate average laptime by using Utilizer : : βgenerateAverageLaptime () β
β @param std : : string The name ofΒ Β Β Β Β Β Β Β Β Β Β Β Β the Race .
β/ Race(std : : string race_name) ; /ββ β Copy Constructor .
β
β @Important just copy the names and performances of the cars β without any laptime . β Cars should be deep copied
β
β @param rhs The race to be copied .
β/
Race( const Race& rhs) ;
ΛRace() ; std : : string getRaceName() const ; /ββ
β Add a new car to race .
β
| β @Important : At theΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β startΒ Β Β Β Β ofΒ Β Β Β Β the raceΒ Β Β Β Β Β Β theirΒ Β Β Β Β Β Β Β Β Β ordering
β |
isΒ Β Β Β Β Β Β Β Β Β Β not | important |
| β No parameter means that you willΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β generate your own | carΒ Β Β Β in | Β |
| β thisΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β function ( with a random name)and add itΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β to your
β/ void addCartoRace() ; /ββ β Add a new car to race . β |
Cars | Β |
| β @Important : At theΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β startΒ Β Β Β Β ofΒ Β Β Β Β the raceΒ Β Β Β Β Β Β theirΒ Β Β Β Β Β Β Β Β Β ordering | isΒ Β Β Β Β Β Β Β Β Β Β not | important |
β
β @param:Β Β Β Β Β Β Β Β Β Β Β car Add given Car toΒ Β Β Β Β Β Β Β Β Β Β others
β/ void addCartoRace(Car& car) ;
/ββ
| β Information About how much carΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β isΒ Β Β Β Β Β Β Β in the race
β β @returns number ofΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β cars β β/ int getNumberOfCarsinRace() ; /ββ β Return stateΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ofΒ Β Β Β Β Β Β everything toΒ Β Β Β Β Β Β Β desiredΒ Β Β Β Β lap β sΒ Β Β Β Β state β |
Β | Β | Β |
| β Your Race willΒ Β Β Β Β Β Β Β Β Β Β Β Β Β have many lapsΒ Β in the courseΒ Β Β Β Β Β Β ofΒ Β Β Β Β Β Β Β Β Β Β its carsΒ willΒ Β Β Β Β Β Β Β have new Laptimes etc . | l i f e . | In each lap , | yourββ |
| β For example , i f you have 20 Laps in your Race , but redo last 10 laps of it . By using goBacktoLap , | let β s | say you want | to ββ |
| β you willΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β take your Race back to 10th Lap.Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ThisΒ Β Β Β Β Β will | also | make changes | in ββ |
| Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β your Cars . Your carsΒ Β Β Β Β Β Β Β Β Β Β willΒ Β Β Β Β Β Β Β Β Β Β Β have only the informationΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β of | theΒ Β Β Β f i r s tΒ Β Β Β Β 10 | laps . | |
| β Lap numbers start from zero . If 5 is given as int lap , you will take back to 6th lap .
β @Important :Β Β Β Β Β Β Β Β Β Β Β Β thisΒ Β Β Β Β willΒ Β Β Β Β alsoΒ Β Β Β Β Β apply toΒ Β Β Β Β Β Β Β Β Β Β Β Β cars and leaderboard too β |
Race ββ | ||
β @param lap to return
β
β/ void goBacktoLap( int lap) ;
/ββ
β PrefixΒ Β Β Β Β Β Β Β additionΒ Β Β Β Β Β Β overload
β
β add one more lap toΒ Β Β Β Β Β Β Β Β Β Β allΒ Β Β Β Β cars
β
β @Important : Update the order of the cars so that the fastest one stays at βthe front
β
β/ void operator++(); /ββ
βΒ Β Β Β Β Β Β Β Β Β Β Β Β Prefix decrement overload
β
β remove one lap fromΒ Β Β Β Β Β Β Β Β Β allΒ Β Β Β Β cars
β
| β @Important : Update the order of the cars the front
β β/ void operator ββ(); /ββ β β IndexingΒ Β Β Β Β Β Β Β Β Β Β Β Β Β overload β |
so that theΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β fastest | one staysΒ Β Β Β Β Β Β Β Β Β Β Β Β at ββ | |
| β This function willΒ Β Β Β Β Β Β Β not be testedΒ Β Β Β Β Β Β forΒ Β Β Β Β Β Β Β Β Β the positionΒ Β Β does notΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β exist .
β |
casesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β in which Car | in | given ββ |
| β @param:Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β car in position Car in the given | position | Β | Β |
| β @returns the carΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β in theΒ Β Β Β Β Β desiredΒ Β Β Β Β Β Β Β Β Β Β Β Β position
β/ Car operator [ ] ( constΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β int car_in_position) ; /ββ β β IndexingΒ Β Β Β Β Β Β Β Β Β Β Β Β Β overload β |
in the currentΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β lap | Β | Β |
| β This function will not be tested for the driver name does not exist .
β |
casesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β in which Car | with given ββ | |
| β @param:Β Β Β Β Β Β Β Β Β Β driver nameΒ Β Β Β Β Β Β Β driver β s name ofΒ Β Β Β Β Β Β Β Β Β Β Β the | desiredΒ Β Β Β Β Β Β car | Β | |
β @returns the car whose driver named as the given @param
β/ Car operator [ ] ( std : : string driver_name) ;
/ββ
β Assignment
β
β @param rhs The Race toΒ Β Β Β Β Β Β Β Β Β Β assignΒ Β Β Β Β intoΒ Β Β Β Β thisΒ Β Β Β Β race
β @return The assigned Race
β/
Race& operator=(const Race& rhs) ;
/ββ β Stream overload .
β
β What to stream :
β PositionβββDriver Name( leader of the race )ββLatest LaptimeββFastest βLaptime of the DriverββSum of Laptimes( in display Laptime format )ββPoints βββExtraPoint ( If applicable ) β . . .
β PositionβββDriver Name( lastΒ Β Β Β Β Β Β Β Β Β Β Β placeΒ Β Β Β ofΒ Β Β Β Β Β Β Β Β Β Β Β Β Β the race )ββLatest LaptimeββFastest ββ
Laptime ofΒ Β Β Β Β Β Β Β Β Β Β Β Β Β the DriverββSum of Laptimes( inΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β display Laptime format )ββPoints ββ
ββExtraPoint ( IfΒ Β Β Β Β Β Β Β Β Β applicable )
β β Example : β 001ββTUFββ1:19.461ββ1:18.935ββ60:35.193ββ25
β 002ββUTAββ1:19.335ββ1:18.335ββ60:37.321ββ18ββ1 β 003ββGRTββ1:20.223ββ1:19.932ββ60:45.184ββ15 β . . .
β 099ββCEIββ1:21.005ββ1:19.867ββ63:47.293
β 100ββECHββ1:23.213ββ1:21.331ββ64:00.123
β
β @Important : for driver numbers smaller in size you have to put zeros as βmuch as neccasary to their beginning
β Example :Β Β Β Β Β i fΒ Β Β Β thereΒ Β Β Β Β isΒ Β Β Β Β Β 11 racersΒ Β Β Β Β Β f i r s tΒ Β Β Β Β positionΒ Β Β Β Β Β Β Β should be 01
β @Important . you can use Laptime ostream when neccessary
β @Important : You should order theΒ Β Β Β Β Β Β Β Β Β Β Β Β Β racersΒ Β Β Β Β Β Β Β according toΒ Β Β Β Β Β Β theirΒ Β Β Β Β Β totalΒ Β Β Β Β Β laptime
β @Important :Β Β Β Β Β Β Β Β Β Β Β Β Β There are two differentΒ Β Β Β Β Β Β Β Β Β Β Β pointΒ Β Β Β Β typesΒ Β Β Β Β Β for F1
β First one is the Fastest Lap point which is 1 point and it is given the βfastest car i f it is in top 10
β Other one is normal racing points and they are 25β18β15β12β10β8β6β4β2β1 inβthis order
β
β @param os Stream to be used .
β @param car Car to be streamed . β @return The current Stream .
β/ friend std : : ostream& operator <<(std : : ostream& os,Β Β Β Β Β Β Β const Race& race) ;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PUBLIC METHODS/PROPERTIES BELOW
};
2.4Β Β Β Β Β Β Β Β Β Β Championship
Championship is the final part of this homework. They keep races with different names. Championship.
class Championship { private : std : : vector< Race > races;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PRIVATE METHODS/PROPERTIES BELOW
public :
/ββ β Constructor .
β
β/ Championship() ; /ββ β Copy Constructor .
β
β @param rhs The Championship to be copied .
β/
Championship( const Championship& rhs) ;
ΛChampionship() ;
/ββ β Add a new Race to Championship .
β
β @Important :Β Β Β Β Β Β Β Β Purpose ofΒ Β Β Β Β Β Β thisΒ Β Β Β Β Β functionΒ Β Β Β Β Β isΒ Β Β Β Β Β to add theΒ Β Β Β Β Β f i r s tΒ Β Β Β race .
β
β @param race Race to add
β/ void addNewRace(Race& race) ;
/ββ β Add a new Race to Championship .
β
β @Important : You willΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β use getAverageLaptime functionΒ Β Β Β Β Β Β Β Β Β Β Β forΒ Β Β Β Β this
β @Important : You can use copy constructorΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ofΒ Β Β Β Β Β Β Β the Race classΒ Β Β Β Β Β Β Β inΒ Β Β Β order
β to just copy driver names for your new Race β @Important : Driver names should be same for each race
β
β @param race name create a new race with given name
β/
void addNewRace(std : : string race_name) ;
/ββ
β Remove race from by usingΒ Β Β Β Β Β Β Β Β Β Β Β Β its name
β
β @param race name remove race from championship
β
β/ void removeRace(std : : string race_name) ;
/ββ
β
β Add lap to race with the given name
β
β @param race name you willΒ Β Β Β Β Β Β Β Β Β findΒ Β Β Β Β Β Β Β the race withΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β this name and add a lap toΒ Β Β Β Β Β Β Β Β Β Β Β Β it
β/ void addLap(std : : string race_name) ;
/ββ
β
β IndexingΒ Β Β Β Β Β Β Β overload
β
β
β @param: race name β @returns the desired Race
β/
Race operator [ ] ( std : : string race_name) ;
/ββ
| β Stream overload .
β β What to stream : β Championship Results |
Β | Β | Β | Β |
| β Driver Surname f i r s t β . . . | three | letters | in | capital (from winner )ββTotal Points |
| β Driver SurnameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β f i r s t
β β Example : β Championship Results β 01βRAIββ194 β 02βHAMββ190 β 03βLECββ100 β 77βOCOββ60 β 78βRICββ1 β 79βGROββ0 β |
three | letters | in | capital ( toΒ Β Β Β Β Β Β Β Β lastΒ Β Β Β Β Β Β Β Β Β place )ββTotal Points |
| β @Important : for driver placements numbers smaller in size you have to put βzeros as much as neccasary to their start
β Example : i f there is 111 racers f i r s t position should be 001 β @Important : You will order drivers according to their total points β β @param os Stream to be used . β @param car Car to be streamed . |
||||
β @return The current Stream .
β/ friend std : : ostream& operator <<(std : : ostream& os, const Championship& βchampionship) ;
// DO NOT MODIFY THE UPPER PART
// ADD OWN PUBLIC METHODS/PROPERTIES BELOW
};
3Β Β Β Β Β Β Β Β Β Β Β Β Extras
While generating Cars you need to produce random double value for its performance. To do this, you MUST use Utilizer class. Itβll return random small double numbers.
The implementation of the the Utilizer is already provided to you. Hence, you just need to do this:
double performance = Utilizer : : generatePerformance() ;
You also MUST use Utilizer::generateLaptimeVariance() for generating a difference to average laptime. After that you will add this to calculate laptime of the car (You will do this for every lap). For generating average laptimes of the Races you again MUST use Utilizer::generateAverageLaptime() function which will return an integer value (You will turn it to Laptime class).
The summary of the memory ownership:
- A Laptime WILL NOT own its nextLaptime.
- A Car WILL NOT own its nextCar.
- A Car WILL own the headLaptime when constructed with.
- A Race WILL own the headCar.
- CopyConstructers WILL not yield ownership of the old variables.
- assignment operator β=β WILL yield ownership of the old variables.
- Owning a Car/Laptime also means owning the nextCar/nextLaptime, and the nextCar/nextLaptim of the nextCar/nextLaptime, β¦



