Created
September 2, 2018 07:57
-
-
Save dibakarsutradhar/e3740784b6e6538eac1f4d96df2e90ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
class CarMake { | |
public: | |
string m_make; | |
string m_model; | |
int m_year; | |
float m_price; | |
void print(){ | |
cout << "Car Make: " << m_make << " Car Model: " << m_model << " Car Year: " << m_year << " Car Price: $" << m_price << " USD." << endl; | |
} | |
}; | |
int main(){ | |
CarMake ferrari { "Ferrari", "LaFerrari", 2015, 100000.00 }; | |
CarMake bugatti { "Bugatti", "Chiron", 2017, 250000.00 }; | |
ferrari.print(); | |
bugatti.print(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment