-
Notifications
You must be signed in to change notification settings - Fork 0
/
funnyFamily.cpp
104 lines (92 loc) · 2.31 KB
/
funnyFamily.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <iostream>
#include <string>
#include <time.h>
using namespace std;
class Pitterle
{
public:
Pitterle() : numFamilyMembers(5), ownsPet(true), income(123456)
{
//purposefully nothing
}
bool activateOperationBaconUnderTree(bool yes) //cause children of Pitterle class to frantically complete a custom present for parents
{
if(yes)
{
//do an all nighter cleaning a messy garage
cout << "You are sleepy" << endl;
return true;
}
else
{
//give in to earthly desires and sleep you naught elf
cout << "You are a horrible elf" << endl;
return false;
}
}
double calculateTaxes(double highTaxesPercent) //determine how much the IRS is coming after you
{
//complicated taxy things here
return (income * highTaxesPercent);
}
private:
int numFamilyMembers;
bool ownsPet;
double income;
};
class Chris : public Pitterle
{
public:
Chris() : Pitterle(), childOrder(1), gender('M'), motivated(false)
{
//purposefully nothing
}
bool activateWorkaholic() //make Chris work forever and he better ENJOY IT WITH PASSION! If conditions are not met return "Chris is sleeping to user"
{
if (motivated) {
//complete code, place self in closet and write more code, then die after code has eaten me
return true;
}
else{
cout << "Chris is going to sleep now" << endl;
return false;
}
}
void sayWeirdSaying() //uses rand() to say a random stored phrases like "Cursing hamsters and guinea pigs!"
{
int saying = -1;
srand(time(NULL));
saying = rand() % 4;
switch (saying) {
case 0:
cout << "Stupid fart" << endl;
break;
case 1:
cout << "Cursing hamsters and guinea pigs!" << endl;
break;
case 2:
cout << "AHUOWFSVDUOHW... I said something." << endl;
break;
case 3:
cout << "1000 bottles of milk on the wall. 1000 bottles of milk..." << endl;
break;
}
}
void setMotivation(bool statusMotivated)
{
motivated = statusMotivated;
}
private:
int childOrder; //The x number child of the family
char gender;
bool motivated;
};
int main()
{
Chris me;
cout << "Family taxes: " << me.calculateTaxes(.01) << endl;
me.activateOperationBaconUnderTree(true);
me.activateWorkaholic();
me.sayWeirdSaying();
return 0;
}