From b9b23117422d88ea53d60a914bf225f6c23c523a Mon Sep 17 00:00:00 2001 From: Lesley-Amezcua Date: Fri, 9 Oct 2015 10:08:34 -0700 Subject: [PATCH 1/5] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b11f68 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# adventure +Team Practice From 7f98b1f815211183fc0540194c94ffe7d440171b Mon Sep 17 00:00:00 2001 From: Lesley-Amezcua Date: Fri, 9 Oct 2015 11:59:05 -0700 Subject: [PATCH 2/5] Create driver.cpp --- driver.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 driver.cpp diff --git a/driver.cpp b/driver.cpp new file mode 100644 index 0000000..1296f1b --- /dev/null +++ b/driver.cpp @@ -0,0 +1,46 @@ +//Lesley Amezcua +//Athena Raya +//Louis Romero +//Dario Molina +#include +#include +#include +#include +using namespace std; + +char menu( ); +double climbing(); +double scuba(); +double skyDive(); +double spelunk(); + +int main() +{ + + return 0; +} +char menu() +{ + + +} +double climbing() +{ + + +} +double scuba() +{ + + +} +double skyDive() +{ + + +} +double spelunk() +{ + + +} From 7f2c6ee395d7ac448875760313cde9ca97ada132 Mon Sep 17 00:00:00 2001 From: Louis-Romero Date: Fri, 9 Oct 2015 18:04:03 -0700 Subject: [PATCH 3/5] int main() function and climbing() function completed (all functions tested) --- a.out | Bin 0 -> 13756 bytes driver.cpp | 92 +++++++++++++++++++++++++++++++++++---- driver.cpp~ | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 205 insertions(+), 9 deletions(-) create mode 100755 a.out create mode 100644 driver.cpp~ diff --git a/a.out b/a.out new file mode 100755 index 0000000000000000000000000000000000000000..730614d3d346a4ad745578f695fc3f01c19df541 GIT binary patch literal 13756 zcmeHOe{dAneSf;+hrn=mU>pl$!24*RIo)0E z_OL`^2V2-hc1V~^nh-jZ(sr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#qU*C%`#Rm2P`=>0VBGE7TBVO( zL|5z4X9y{OrmZCI6;?@nUg0^}>CB6#=FyV+3k2VXiuD%?zP}XX<$~`U#rPt@_k&`5 zap5_+7{8^kei!3Q1h31*_|ifiYBBB;yp9&*e!=TwF&;oZrS61e-HVJMUeBCDFEZG8 zohrs}6}$Vu5&dV#t-FHR% zdYUKxgD%ISLigMwJePw#IYu~g`;=k=h%GcG)&aQA!U9_fFj7+u?m+VpkZE$cJK z^C)m?chu$on^J$~c{vNbRKG@~{z^d~psDb6`D4_{|3;rqu-GDxz@R`lzYp{KBH5Ml z|1k*4D5LCFU3sv{I*HF5Pm-4MQzi9hp7*WPFy^6qzU@)CdwxDH{mh(iIp7-JLf!M{ zDd45@I_VqPa%$RD{%#h0MB+GalUh z!2O%xxrCBIdkOZ=fPuID?0~TM65{#3z5$pxID@tzid5s-1hz1Ou}ns088_7$Mgr*` z*r+h})l?gl@M}?yGmr!_R}O+hT6Q!QN9J`Q*~6$xB!sc8X;)pS2`2e2qtTE#!iKT6 zCA1@Kgm*Sj61N-|Rae@(wr*_=BV9RE*Aym=q5zRG?F3{pxG);_?hNf{tQWM=VJ9TZ z&?$La*JW0+%0#A2Zkc#J6Sfn)UAUd%9Lwe9hzj=o;hE?vNm{v6Inm0=%ye@~w=UVT zo$O8n=km1g{@nh72An9QsT0_piS4eIZk98TjP;L@o$hX67sf4~NE!K@Ng408 zoHvBnsd1kA#p(J+(aF3&mobz1)PCwN^mzJkM!l;=Bc4keNNkuvUGeoVO?XY9K#7t41=4+#6RP#0LM^%4KOptzC$ E0U25Bd;kCd literal 0 HcmV?d00001 diff --git a/driver.cpp b/driver.cpp index 1296f1b..b6c0ca3 100644 --- a/driver.cpp +++ b/driver.cpp @@ -2,10 +2,12 @@ //Athena Raya //Louis Romero //Dario Molina -#include -#include -#include -#include + +#include +#include +#include // toupper() +#include + using namespace std; char menu( ); @@ -16,18 +18,90 @@ double spelunk(); int main() { - - return 0; + char userChoice, loopController = 'Y'; + cout << "Welcome to the High Travel Agency Program" << endl; + cout << "Which vacation would you like to go on?" << endl; + userChoice = menu(); + + while(loopController == 'Y') + { + switch(userChoice) + { + case '1': + cout << "Price of trip will be $" << climbing() << endl; + cout << endl; + break; + case '2': + cout << "Price of trip will be $" << scuba(); + cout << endl; + break; + case '3': + cout << "Price of trip will be $" << skyDive(); + cout << endl; + break; + case '4': + cout << "Price of trip will be $" << spelunk(); + cout << endl; + break; + default: + cout << "Invalid Input" << endl; + cout << endl; + } + + cout << "Would you like to check the price of another trip?" << endl; + cout << "Press Y to continue or any key to terminate" << endl; + cin >>loopController; + loopController = toupper(loopController); + } + cout << "Thank you for using our program!" << endl; + return 0; } char menu() { - } double climbing() { - - + const double baseChargePerPerson = 350.00; + const double climbingInstructionCost = 100.00; + const double equipmentRentalCharge = 40.00; + const double percentDiscount = 0.10; + const double numberOfDays = 3.0; + double needInstruction, needEquipment, numPeople; + double baseChargePrice, instructionCharge, equipmentRentalPrice, totalPrice, daysEquipmentNeeded; + + cout << "How many people are going climbing?" << endl; + cin >> numPeople; + + if (numPeople < 0) + { + return 0.00; + } + + else + { + if( numPeople < 5)//If less than 5 people no discount for that group + { + baseChargePrice = numPeople * baseChargePerPerson;//Price of base charge for group smaller than 5 people + } + else//Else they get a 10 % discount + { + baseChargePrice = numPeople * baseChargePerPerson; + baseChargePrice = baseChargePrice - (baseChargePrice * percentDiscount);//Price of base charge for group greater than 5 people + } + + cout << "How many people need instruction: " << endl; + cin >> needInstruction; + cout << "How many people need to rent equipment: " << endl; + cin >> needEquipment; + + instructionCharge = climbingInstructionCost * needInstruction; + equipmentRentalPrice = needEquipment * equipmentRentalCharge * numberOfDays; + + totalPrice = baseChargePrice + instructionCharge + equipmentRentalPrice; + return totalPrice; + } + } double scuba() { diff --git a/driver.cpp~ b/driver.cpp~ new file mode 100644 index 0000000..59ed2a8 --- /dev/null +++ b/driver.cpp~ @@ -0,0 +1,122 @@ +//Lesley Amezcua +//Athena Raya +//Louis Romero +//Dario Molina + +#include +#include +#include // toupper() +#include + +using namespace std; + +char menu( ); +double climbing(); +double scuba(); +double skyDive(); +double spelunk(); + +int main() +{ + char userChoice, loopController = 'Y'; + cout << "Welcome to the High Travel Agency Program" << endl; + cout << "Which vacation would you like to go on?" << endl; + userChoice = menu(); + cout << "Enter choice" << endl; + cin >> userChoice; + + while(loopController == 'Y') + { + switch(userChoice) + { + case '1': + cout << "Price of trip will be $" << climbing() << endl; + cout << endl; + break; + case '2': + cout << "Price of trip will be $" << scuba(); + cout << endl; + break; + case '3': + cout << "Price of trip will be $" << skyDive(); + cout << endl; + break; + case '4': + cout << "Price of trip will be $" << spelunk(); + cout << endl; + break; + default: + cout << "Invalid Input" << endl; + cout << endl; + } + + cout << "Would you like to check the price of another trip?" << endl; + cout << "Press Y to continue or any key to terminate" << endl; + cin >>loopController; + loopController = toupper(loopController); + } + cout << "Thank you for using our program!" << endl; + return 0; +} +char menu() +{ + +} +double climbing() +{ + const double baseChargePerPerson = 350.00; + const double climbingInstructionCost = 100.00; + const double equipmentRentalCharge = 40.00; + const double percentDiscount = 0.10; + const double numberOfDays = 3.0; + double needInstruction, needEquipment, numPeople; + double baseChargePrice, instructionCharge, equipmentRentalPrice, totalPrice, daysEquipmentNeeded; + + cout << "How many people are going climbing?" << endl; + cin >> numPeople; + + if (numPeople < 0) + { + return 0.00; + } + + else + { + if( numPeople < 5)//If less than 5 people no discount for that group + { + baseChargePrice = numPeople * baseChargePerPerson;//Price of base charge for group smaller than 5 people + } + else//Else they get a 10 % discount + { + baseChargePrice = numPeople * baseChargePerPerson; + baseChargePrice = baseChargePrice - (baseChargePrice * percentDiscount);//Price of base charge for group greater than 5 people + } + + cout << "How many people need instruction: " << endl; + cin >> needInstruction; + cout << "How many people need to rent equipment: " << endl; + cin >> needEquipment; + + instructionCharge = climbingInstructionCost * needInstruction; + equipmentRentalPrice = needEquipment * equipmentRentalCharge * numberOfDays; + + totalPrice = baseChargePrice + instructionCharge + equipmentRentalPrice; + return totalPrice; + } + +} +double scuba() +{ + + +} +double skyDive() +{ + + +} +double spelunk() +{ + + +} From 8a162d2bbb5e35af250b0cb530b3cf14fa5f0c89 Mon Sep 17 00:00:00 2001 From: Louis-Romero Date: Fri, 9 Oct 2015 18:10:51 -0700 Subject: [PATCH 4/5] Final save --- driver.cpp~ | 2 -- 1 file changed, 2 deletions(-) diff --git a/driver.cpp~ b/driver.cpp~ index 59ed2a8..b6c0ca3 100644 --- a/driver.cpp~ +++ b/driver.cpp~ @@ -22,8 +22,6 @@ int main() cout << "Welcome to the High Travel Agency Program" << endl; cout << "Which vacation would you like to go on?" << endl; userChoice = menu(); - cout << "Enter choice" << endl; - cin >> userChoice; while(loopController == 'Y') { From 7d96643ef753e628b691074979e9cdb6625e44bd Mon Sep 17 00:00:00 2001 From: Athena Raya Date: Mon, 12 Oct 2015 18:59:53 -0700 Subject: [PATCH 5/5] created Function for Barron Cliff Spelunk --- a.out | Bin 13756 -> 13756 bytes driver.cpp | 28 ++++++++++++++++++++++++++-- driver.cpp~ | 28 ++++++++++++++++++++++++++-- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/a.out b/a.out index 730614d3d346a4ad745578f695fc3f01c19df541..fe199fb2f0240aaa57427222585b0258f44b9826 100755 GIT binary patch delta 1980 zcmZWq3rt&O6#nmR%V^W~-d=Dpo#n^Ccu6UVOq^~Mwr+PgmnoT!C`yHH?Iw4m9zKSem@Y9|=OdUn?O*~U4gsC@{P%J%MQ_r3dcJec zcfS95FE(9l>W>;m(vkFxq@TSK5j=wIc?5^_$0Lw;nJekGtJ>JiZ&f!IKYcmvOWo8N z?K#uQ(0TS`iXQV0BwiXH=17tLN8M~~q?{)v!|iu_03RL8u1E3L|4Aew^Qn;5cPaiR zIPnC7P_J|D+Q(qIh;xoSW!P5UuNIU+j@VZhTi|$Sj269pD~Tabp_AD&$z?-EaIN@P z$X!=_P$`!4zXA8!1sGfW4;G;X&H^n?)x{!f47A%ihP3qz=fIsg8vi7zJeXYX{%`%) zf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y&NLAanBK+bfj%^kP`%(=1?y6-PVBZ)g1Rb^}p)6JBms;cdm;sL4p zRPM`)_ft~xJo<`M!=jPC#x~%--Su~xZ$>6o4Uv=g%u4hj%}F2I!tWgIe6MEzp~G+P z@1)P=`qYT*6v*ca#)V45_P0T1!_)gfRnx$>KhZg0_@S!K0tawjGYS|4`ha^d6%pVY zz(c?;U@x#6I0PI4P64NZ3NW%pKe!sisRxvG1;nZQ)ZngbXh)JLE`{xI$e)Tk?Iq!p z2E&V@t<(%1Ruvvz*y${FyS?JOSsDPWuFyrmy%m}P+~m?mlMOkpQiZ2l_?4cw>agz zC`&ml8=@U`)ihfxTZ{f`+1f2upEH#6@Htc4>P{G&3p`qwwi}ql3WV$RGE38qhBBj* zAzt*~7dAcV2<2R!%{z)Xo5<{_TGN-&oWI(-0a}4M8FQyv8cPI`Nwh0)3}>S60?!K` zvNRp9C}cF|nI6Gs;Q~_|ebv-zeJsx>F`93BO~k*qB^VI)(vjeC(d3}{pjU{dEX^t7 E-|$dUd;kCd diff --git a/driver.cpp b/driver.cpp index b6c0ca3..c3e548c 100644 --- a/driver.cpp +++ b/driver.cpp @@ -115,6 +115,30 @@ double skyDive() } double spelunk() { - - + const double baseChargePerPerson = 700.00; + const double equipRental = 40.00; + const double discount = 0.10; + const double daysSpent = 8.0; + + double needEquip, numOfPeople; + double baseCharge, equipPrice, totalCost; + + cout << " How many people are in your party ? " << endl; + cin >> numOfPeople; + if( numOfPeople < 5 ) + { + baseCharge = (numOfPeople * baseChargePerPerson); + } + else + { + baseCharge = (numOfPeople * baseChargePerPerson); + baseCharge = baseCharge -(baseCharge * discount); + } + + cout << " How many people will be needing rental equiment ? " << endl; + cin >> needEquip; + needEquip = (needEquip * daysSpent) * equipRental; + + totalCost = baseCharge + needEquip; + return totalCost; } diff --git a/driver.cpp~ b/driver.cpp~ index b6c0ca3..95a92b8 100644 --- a/driver.cpp~ +++ b/driver.cpp~ @@ -115,6 +115,30 @@ double skyDive() } double spelunk() { - - + const double baseChargePerPerson = 700.00; + const double equipRental = 40.00; + const double discount = 0.10; + const double daysSpent = 8.0; + + double needEquip, numOfPeople; + double baseCharge, equipPrice, totalCost; + + cout << " How many people are in your party ? " << endl; + cin >> numOfPeople; + if( numOfPeople < 5 ) + { + baseCharge = (numOfPeople * baseChargePerPerson); + } + else + { + baseCharge = (numOfPeople * baseChargePerPerson); + baseCharge = baseCharge -(baseCharge * discount); + } + + cout << " How many people will be needing rental equiment ? " << endlk + cin >> needEquip; + needEquip = (needEquip * daysSpent) * equipRental; + + totalCost = baseCharge + needEquip; + return totalCost; }