Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Autonomous.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Autonomous
{
public:
virtual int range() = 0;
protected:
int radius;
};
24 changes: 24 additions & 0 deletions Truck.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class Truck : public Vehicle, public Autonomous {

public:
Truck(std::string a, int b){
Truck::set_values(a,b);
float Truck::getPrice();
};

void set_values(std::string a,int b){
brand = a;
year = b;
};

float getPrice(){
return 0; // do magic
}

void range(){
//i am 12 and what is this?
}

float getCost(){
return getPrice();
}
Empty file added Truck.h
Empty file.
6 changes: 6 additions & 0 deletions Vehicle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "vehicle.h"

Vehicle::Vehicle()
{
cost = 0; //free car :)
}
13 changes: 13 additions & 0 deletions Vehicle.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef VEHICLE_H_
#define VEHICLE_H_

class Vehicle
{
protected:
float cost;
public:
Vehicle();
virtual float getCost() = 0;
};

#endif