From 6ee50a72b8e626bdd4485fc3a612a287852f19de Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Mon, 30 Sep 2019 09:34:29 -0400 Subject: [PATCH 01/22] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e69de29b..28abbb86 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,2 @@ +Name: Andres Paz Vicca +FSUID: aap17e From ebf12597f0fdea22f3bbbb06f447ad67ca8238cc Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Mon, 30 Sep 2019 09:36:01 -0400 Subject: [PATCH 02/22] Updated information files The information files have been updated to describe the current state of the repository. Repository owner information added to README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28abbb86..c9aa542a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ Name: Andres Paz Vicca -FSUID: aap17e +FSUID: AAP17E From 7c8ec8c0e09d68437c6421e62b88e2a9465a5dc8 Mon Sep 17 00:00:00 2001 From: aap17e Date: Thu, 3 Oct 2019 21:05:01 -0400 Subject: [PATCH 03/22] new commit with fsu id --- .README.md.un~ | Bin 0 -> 549 bytes README.md | 2 +- README.md~ | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .README.md.un~ create mode 100644 README.md~ diff --git a/.README.md.un~ b/.README.md.un~ new file mode 100644 index 0000000000000000000000000000000000000000..4b9c29c95e16a6d83b99359033d63f7abafe478f GIT binary patch literal 549 zcmWH`%$*;a=aT=FfvIr!o5P07ub5w4Wo9A$uzS6s{GnwFcb*Ph9FV?_A>-;11_lNu zAm()o4)t`gQgCz(Ff@0C2?A+GC+ED+iF3m^eB0FnZm3=;nj1YqrG hiblEA3ISkr9EV27R|%k@;5dRB4q~H5uxaD-RRF5^DOdmi literal 0 HcmV?d00001 diff --git a/README.md b/README.md index c9aa542a..28abbb86 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ Name: Andres Paz Vicca -FSUID: AAP17E +FSUID: aap17e diff --git a/README.md~ b/README.md~ new file mode 100644 index 00000000..a3d6c002 --- /dev/null +++ b/README.md~ @@ -0,0 +1,2 @@ +Name: Andres Paz Vicca +FSUID: AAP17E From 80c2e60c5eb62555f764bf02a849b4f7bbe14258 Mon Sep 17 00:00:00 2001 From: aap17e Date: Fri, 4 Oct 2019 09:30:47 -0400 Subject: [PATCH 04/22] deleted trial file --- docs/commit.txt | 0 docs/status.txt.txt | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 docs/commit.txt create mode 100644 docs/status.txt.txt diff --git a/docs/commit.txt b/docs/commit.txt new file mode 100644 index 00000000..e69de29b diff --git a/docs/status.txt.txt b/docs/status.txt.txt new file mode 100644 index 00000000..dfcb9bdd --- /dev/null +++ b/docs/status.txt.txt @@ -0,0 +1,5 @@ +On branch master +Your branch is ahead of 'origin/master' by 1 commit. + (use "git push" to publish your local commits) + +nothing to commit, working tree clean From 7bfca233f7c39130cb4140d296a58dfdf7aca612 Mon Sep 17 00:00:00 2001 From: aap17e Date: Fri, 4 Oct 2019 09:42:46 -0400 Subject: [PATCH 05/22] added answers.txt file --- docs/{commit.txt => answers.txt.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{commit.txt => answers.txt.txt} (100%) diff --git a/docs/commit.txt b/docs/answers.txt.txt similarity index 100% rename from docs/commit.txt rename to docs/answers.txt.txt From 9c0ede2ccf9ed1e8f6d806eb2a1413391f2e8bc4 Mon Sep 17 00:00:00 2001 From: aap17e Date: Fri, 4 Oct 2019 10:52:53 -0400 Subject: [PATCH 06/22] added answers to section 3 --- docs/answers.txt.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/docs/answers.txt.txt b/docs/answers.txt.txt index e69de29b..2c85580f 100644 --- a/docs/answers.txt.txt +++ b/docs/answers.txt.txt @@ -0,0 +1,67 @@ +a) +$ git push +Enumerating objects: 12, done. +Counting objects: 100% (12/12), done. +Delta compression using up to 4 threads +Compressing objects: 100% (7/7), done. +Writing objects: 100% (10/10), 992 bytes | 82.00 KiB/s, done. +Total 10 (delta 2), reused 0 (delta 0) +remote: Resolving deltas: 100% (2/2), completed with 1 local object. +To https://github.com/aap17e/assignment2.git + ebf1259..80c2e60 master -> master + +b) +$ git shortlog -s + 6 Esteban Parra + 5 aap17e +=11 commits in total + +c) +$ git log -- .gitignore + +Date: Wed Sep 25 18:13:30 2019 -0400 + +d) +Makes sure your code changes are verified before delivering them to other developers +-Support quality assurance/code quality/integration/testing processes +-Better support for developers working in parallel + +e) +The git log command displays committed snapshots. It lets you list the project history, filter it, and search for specific changes. +While git status lets you inspect the working directory and the staging area, git log only operates on the committed history. + +f) +git log --follow -- vehicle.h + + +g) + +git log --grep=file + +h) + +Inheritance is the mechanism of basing an object or class upon another object or class while +retaining similar implementation. + +Polymorphism is a programming language's ability to process objects differently depending on +their data type or class. More specifically, it is the ability to redefine methods for derived classes + +Encapsulation describes the idea of bundling data and methods that work on that data within one unit + +i) Dictator and Lieutenants Workflow: ******Distributed development and integration.******8 +One central/blessed repository:Everyone makes pull from this repository. Only the dictator can push to it. +�Dictator repository: Merges changes in the lieutenant repositories and solves any arising conflicts. +�Lieutenant repositories: Merges changes for some (not all) developers and solves conflicts. A developer +pushes changes to the assigned lieutenant repository. + +Integration Manager WorkflowFrom: Each developer makes push to his/her own public repository, +and pull from the blessed/central repository. +Two repositories per developer(Public/private) +Integration conflict resolution are done by the integration manager. +(Centralized integration)Each developer makes pull and push to his/her own public repository. + +j) + +A team of developers would benefit from the Dictator and Lieutenants workflow since they can all commit their +changes to the same repository and solve any arising conflicts, the final product is clean since only the +dictator can push to it \ No newline at end of file From 92e17949bed15ad133dd41c0b43c1820639df502 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:03:15 -0400 Subject: [PATCH 07/22] Create Jet.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit o A jet has an additional member data “numberOfEngines” (int). It is an integer with default value of 1. o Mileage = A random number between 40 and 100 miles per minute. If the Jet has more than 2 engines and the fuel type is “Rocket”, the mileage will be boosted by 5.5% per engine. Jet inherits from the PoweredVehicle class. --- Jet.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Jet.h diff --git a/Jet.h b/Jet.h new file mode 100644 index 00000000..5e1b9c6e --- /dev/null +++ b/Jet.h @@ -0,0 +1,25 @@ + +#ifndef DRIVINGSIMULATOR_JET_H +#define DRIVINGSIMULATOR_JET_H + +#include "PoweredVehicle.h" +#include "Vehicle.h" + +class Jet : public PoweredVehicle { + +private: + int numberOfEngines; + +public: + explicit Jet(string brand, string model, int numberOfEngines = 1); + + virtual ~Jet(); + int getEngineCount(); + void setEngineCount(int gearCount); + virtual double mileageEstimate(double time); + + virtual string toString(); +}; + + +#endif From 1b0d594416b5ffe7b238ac340362b0adc0f218c0 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:05:35 -0400 Subject: [PATCH 08/22] Created Skateboard.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mileage = A random number between 0.1 and 0.5 miles per minute. If time is more than 25 minutes and less than 250 minutes, add a random amount of mileage, ranging from to 1 to a third of the time’s value. Skateboard inherits from the Vehicle class --- Skateboard.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Skateboard.h diff --git a/Skateboard.h b/Skateboard.h new file mode 100644 index 00000000..6686382e --- /dev/null +++ b/Skateboard.h @@ -0,0 +1,20 @@ +#ifndef DRIVINGSIMULATOR_SKATEBOARD_H +#define DRIVINGSIMULATOR_SKATEBOARD_H + +#include "Vehicle.h" + +class Skateboard : public Vehicle { + +private: + +public: + explicit Skateboard(string brand, string model); + + virtual ~Skateboard(); + virtual double mileageEstimate(double time); + + virtual string toString(); +}; + + +#endif From 0be7e276551630c3d6492702c37f432fc9e8f6d9 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:18:59 -0400 Subject: [PATCH 09/22] Created Veoride.h Last vehicle and implement it as a new class. This new class should have a non-trivial mileage computation --- Veoride.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Veoride.h diff --git a/Veoride.h b/Veoride.h new file mode 100644 index 00000000..e9690085 --- /dev/null +++ b/Veoride.h @@ -0,0 +1,22 @@ +#ifndef DRIVINGSIMULATOR_VEORIDE_H +#define DRIVINGSIMULATOR_VEORIDE_H + +#include "PoweredVehicle.h" + +#include +#include + +class Scooter : public PoweredVehicle { + +public: + Veoride(); + + explicit Veoride(string brand, string model, string fuelType); + + virtual ~Veoride(); + virtual double mileageEstimate(double time); + virtual string toString(); +}; + + +#endif From ae1c82872435937c3bcde4dc930c2153cb20edd6 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:51:52 -0400 Subject: [PATCH 10/22] Created veoride.cpp it should have a non-trivial mileage computation --- Veoride.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Veoride.cpp diff --git a/Veoride.cpp b/Veoride.cpp new file mode 100644 index 00000000..e41871e4 --- /dev/null +++ b/Veoride.cpp @@ -0,0 +1,30 @@ +#include "Veoride.h" + +Veoride::~Veoride() = default; + +//default construtor +Veoride::Veoride() { + setPrice("Cheapy"); + setSpeed("30mph"); + setFuelType("manpower/electric"); +} + +//default constructor +Veoride::Veoride(string price, string speed, string fuelType) { + setPrice(price); + setSpeed(speed); + setFuelType(fuelType); +} + +double Veoride::mileageEstimate(double time) { + double mileage = 5 * time; + if ( fuelType == "manpower/electric" ) + { + mileage += mileage * 3; + } + return mileage; +} + +string Veoride::toString() { + return "-> Veoride\n" + PoweredVehicle::toString(); +} From 6ba00733bc0330c51dbe7ab801523450c66938e5 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:57:43 -0400 Subject: [PATCH 11/22] Updated answers.txt to display oo question object oriented question is responded in this commit --- docs/answers.txt.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/answers.txt.txt b/docs/answers.txt.txt index 2c85580f..67997e5c 100644 --- a/docs/answers.txt.txt +++ b/docs/answers.txt.txt @@ -50,8 +50,8 @@ Encapsulation describes the idea of bundling data and methods that work on that i) Dictator and Lieutenants Workflow: ******Distributed development and integration.******8 One central/blessed repository:Everyone makes pull from this repository. Only the dictator can push to it. -�Dictator repository: Merges changes in the lieutenant repositories and solves any arising conflicts. -�Lieutenant repositories: Merges changes for some (not all) developers and solves conflicts. A developer +•Dictator repository: Merges changes in the lieutenant repositories and solves any arising conflicts. +•Lieutenant repositories: Merges changes for some (not all) developers and solves conflicts. A developer pushes changes to the assigned lieutenant repository. Integration Manager WorkflowFrom: Each developer makes push to his/her own public repository, @@ -64,4 +64,9 @@ j) A team of developers would benefit from the Dictator and Lieutenants workflow since they can all commit their changes to the same repository and solve any arising conflicts, the final product is clean since only the -dictator can push to it \ No newline at end of file +dictator can push to it + +Object Oriented Question) + +It uses both encapsulation and polymorphism. +The simulater is using encapsulation by having classes that encompass functions and by separating the member data and functions into different levels of protection. On the other hand, virtual functions are being used in the vehicle and powered vehicle classes so it has polymorphism. the common function name serves the purpose of polymorphism From 66c70cb7779c9b5374cbcb1838ffa1cc293f9e43 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:31:00 -0400 Subject: [PATCH 12/22] Update Jet.h --- Jet.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jet.h b/Jet.h index 5e1b9c6e..7b8d0802 100644 --- a/Jet.h +++ b/Jet.h @@ -1,4 +1,6 @@ - +// +// Created by Andres Paz +// #ifndef DRIVINGSIMULATOR_JET_H #define DRIVINGSIMULATOR_JET_H @@ -16,6 +18,7 @@ class Jet : public PoweredVehicle { virtual ~Jet(); int getEngineCount(); void setEngineCount(int gearCount); + virtual ~Jet(); virtual double mileageEstimate(double time); virtual string toString(); From 768f90d86c26d3da0cdda5d683fb1b0274aff86d Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:32:12 -0400 Subject: [PATCH 13/22] Updated header --- Skateboard.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Skateboard.h b/Skateboard.h index 6686382e..5447eec2 100644 --- a/Skateboard.h +++ b/Skateboard.h @@ -1,3 +1,6 @@ +// +// Created by Andres Paz +// #ifndef DRIVINGSIMULATOR_SKATEBOARD_H #define DRIVINGSIMULATOR_SKATEBOARD_H From 0be48ed82a2464c65597f6a91450d418e911e156 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:34:44 -0400 Subject: [PATCH 14/22] updated header --- Veoride.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Veoride.cpp b/Veoride.cpp index e41871e4..a0a0c63f 100644 --- a/Veoride.cpp +++ b/Veoride.cpp @@ -1,18 +1,21 @@ +// +// Created by Andres Paz +// #include "Veoride.h" Veoride::~Veoride() = default; //default construtor Veoride::Veoride() { - setPrice("Cheapy"); - setSpeed("30mph"); + setBrand("Cheapy"); + setModel("30mph"); setFuelType("manpower/electric"); } //default constructor -Veoride::Veoride(string price, string speed, string fuelType) { - setPrice(price); - setSpeed(speed); +Veoride::Veoride(string brand, string model, string fuelType) { + setBrand(brand); + setModel(model); setFuelType(fuelType); } From 4345de36a36f3a2b94292f68d74022b90313f4f5 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 22:35:20 -0400 Subject: [PATCH 15/22] updated header --- Veoride.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Veoride.h b/Veoride.h index e9690085..e9ab2f29 100644 --- a/Veoride.h +++ b/Veoride.h @@ -1,3 +1,6 @@ +// +// Created by Andres Paz +// #ifndef DRIVINGSIMULATOR_VEORIDE_H #define DRIVINGSIMULATOR_VEORIDE_H From db8758afb93b416d659535ac2f621b1ab1e027e2 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:10:31 -0400 Subject: [PATCH 16/22] created Jet.cpp --- Jet.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Jet.cpp diff --git a/Jet.cpp b/Jet.cpp new file mode 100644 index 00000000..c22b4a8d --- /dev/null +++ b/Jet.cpp @@ -0,0 +1,43 @@ +// +// Created by Andres Paz +// +#include "Jet.h" + +//default constructor +Jet::Jet(string brand, string model, string fuelType, int numEngines) { + setBrand(brand); + setModel(model); + setFuelType(fuelType); + setNumberOfEngines(numEngines); +} + +//deconstructor +Jet::~Jet() = default; + +//set function +void Jet::setNumberOfEngines(int numEngines) { + numberOfEngines = numEngines; +} + +//get function +int Jet::getNumberOfEngines() { + return numberOfEngines; +} + +//needed help implementing this +//mileage estimate -- creates a random num (40-100) and updates milage based on credentials +double Jet::mileageEstimate(double time) { + int r = rand() % 60+40; + double mileage = r * time; + if ( getNumberOfEngines() > 2 && fuelType == "Rocket" ) + { + mileage += mileage * ( 5.5 * getNumberOfEngines() ); + } + return mileage; +} +//needed help implementing this +//Jet message +string Jet::toString() { + return "-> Jet\n" + PoweredVehicle::toString() + "\n\tNumber of engines: " + + to_string( getNumberOfEngines() ); +} From 6dce9cc97bbedc58e553abbd3a54774c14f39644 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:21:02 -0400 Subject: [PATCH 17/22] updated answers, Object Oriented question Is the Driving simulator prototype using polymorphism and/or encapsulation?. --- docs/answers.txt.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/answers.txt.txt b/docs/answers.txt.txt index 67997e5c..aee9c47f 100644 --- a/docs/answers.txt.txt +++ b/docs/answers.txt.txt @@ -69,4 +69,5 @@ dictator can push to it Object Oriented Question) It uses both encapsulation and polymorphism. + The simulater is using encapsulation by having classes that encompass functions and by separating the member data and functions into different levels of protection. On the other hand, virtual functions are being used in the vehicle and powered vehicle classes so it has polymorphism. the common function name serves the purpose of polymorphism From e2110ef80701dbdd1f3db92576e7054d46d4a4ec Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:23:18 -0400 Subject: [PATCH 18/22] updated --- Skateboard.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Skateboard.h b/Skateboard.h index 5447eec2..ef53bad5 100644 --- a/Skateboard.h +++ b/Skateboard.h @@ -8,15 +8,13 @@ class Skateboard : public Vehicle { -private: - public: explicit Skateboard(string brand, string model); - virtual ~Skateboard(); - virtual double mileageEstimate(double time); - + virtual string toString(); + virtual double mileageEstimate(double time); + virtual ~Skateboard(); }; From ba28ead0afdef12063e7827d65d3f302d1fcb312 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:25:15 -0400 Subject: [PATCH 19/22] Fixed double typing in file --- Jet.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jet.h b/Jet.h index 7b8d0802..29dca64b 100644 --- a/Jet.h +++ b/Jet.h @@ -9,19 +9,19 @@ class Jet : public PoweredVehicle { -private: - int numberOfEngines; - public: explicit Jet(string brand, string model, int numberOfEngines = 1); virtual ~Jet(); int getEngineCount(); void setEngineCount(int gearCount); - virtual ~Jet(); - virtual double mileageEstimate(double time); + int getEngineCount(); virtual string toString(); + virtual ~Jet(); + virtual double mileageEstimate(double time); +private: + int numberOfEngines; }; From ce37d92c2cfe99bbafd6206ec2d69c0a2216ea0c Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:26:40 -0400 Subject: [PATCH 20/22] fixed indentation --- Jet.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Jet.cpp b/Jet.cpp index c22b4a8d..bf38f517 100644 --- a/Jet.cpp +++ b/Jet.cpp @@ -11,9 +11,6 @@ Jet::Jet(string brand, string model, string fuelType, int numEngines) { setNumberOfEngines(numEngines); } -//deconstructor -Jet::~Jet() = default; - //set function void Jet::setNumberOfEngines(int numEngines) { numberOfEngines = numEngines; @@ -23,6 +20,15 @@ void Jet::setNumberOfEngines(int numEngines) { int Jet::getNumberOfEngines() { return numberOfEngines; } +//deconstructor +Jet::~Jet() = default; + +//needed help implementing this +//Jet message +string Jet::toString() { + return "-> Jet\n" + PoweredVehicle::toString() + "\n\tNumber of engines: " + + to_string( getNumberOfEngines() ); +} //needed help implementing this //mileage estimate -- creates a random num (40-100) and updates milage based on credentials @@ -35,9 +41,3 @@ double Jet::mileageEstimate(double time) { } return mileage; } -//needed help implementing this -//Jet message -string Jet::toString() { - return "-> Jet\n" + PoweredVehicle::toString() + "\n\tNumber of engines: " + - to_string( getNumberOfEngines() ); -} From 1ab84c723b2c809e28283167a665372cc49d3300 Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:27:37 -0400 Subject: [PATCH 21/22] updated the file to fix error --- Veoride.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Veoride.cpp b/Veoride.cpp index a0a0c63f..afd49e94 100644 --- a/Veoride.cpp +++ b/Veoride.cpp @@ -5,6 +5,12 @@ Veoride::~Veoride() = default; +//default constructor +Veoride::Veoride(string brand, string model, string fuelType) { + setBrand(brand); + setModel(model); + setFuelType(fuelType); +} //default construtor Veoride::Veoride() { setBrand("Cheapy"); @@ -12,12 +18,6 @@ Veoride::Veoride() { setFuelType("manpower/electric"); } -//default constructor -Veoride::Veoride(string brand, string model, string fuelType) { - setBrand(brand); - setModel(model); - setFuelType(fuelType); -} double Veoride::mileageEstimate(double time) { double mileage = 5 * time; From e447c09c2e3a196d5b7a84b0cfe96b1412af7a2c Mon Sep 17 00:00:00 2001 From: aap17e <44821710+aap17e@users.noreply.github.com> Date: Fri, 4 Oct 2019 23:28:45 -0400 Subject: [PATCH 22/22] last commit must be Object O Question --- docs/answers.txt.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/answers.txt.txt b/docs/answers.txt.txt index aee9c47f..24885e3a 100644 --- a/docs/answers.txt.txt +++ b/docs/answers.txt.txt @@ -67,7 +67,6 @@ changes to the same repository and solve any arising conflicts, the final produc dictator can push to it Object Oriented Question) - It uses both encapsulation and polymorphism. The simulater is using encapsulation by having classes that encompass functions and by separating the member data and functions into different levels of protection. On the other hand, virtual functions are being used in the vehicle and powered vehicle classes so it has polymorphism. the common function name serves the purpose of polymorphism