From 9611d12b5783028a1949c13d1d157ccf024fd71c Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Fri, 19 Feb 2021 12:06:26 -0500 Subject: [PATCH] Combine java and C++ gits --- cpp/2.12.1-input-output/a.out | Bin 0 -> 17344 bytes cpp/2.12.1-input-output/main.cpp | 17 ++ cpp/2.13-inches-to-feet-inches/a.out | Bin 0 -> 17288 bytes cpp/2.13-inches-to-feet-inches/main.cpp | 13 ++ cpp/2.14-madlib/a.out | Bin 0 -> 18064 bytes cpp/2.14-madlib/main.cpp | 20 ++ cpp/2.15-seconds-simplified/a.out | Bin 0 -> 17288 bytes cpp/2.15-seconds-simplified/main.cpp | 24 ++ .../a.out | Bin 0 -> 17288 bytes .../main.cpp | 17 ++ cpp/3.14-pizza-party/a.out | Bin 0 -> 17984 bytes cpp/3.14-pizza-party/main.cpp | 21 ++ cpp/3.15-ordering-pizza/a.out | Bin 0 -> 17880 bytes cpp/3.15-ordering-pizza/main.cpp | 23 ++ cpp/3.16-Postfix-of-3/main.cpp | 17 ++ cpp/3.17-prefix-of-3/a.out | Bin 0 -> 18176 bytes cpp/3.17-prefix-of-3/main.cpp | 17 ++ cpp/3.18-midfix-of-3/a.out | Bin 0 -> 18288 bytes cpp/3.18-midfix-of-3/main.cpp | 18 ++ cpp/3.21-variables-input-and-casting/a.out | Bin 0 -> 18376 bytes cpp/3.21-variables-input-and-casting/main.cpp | 36 +++ cpp/4.22-Smallest-number/a.out | Bin 0 -> 17184 bytes cpp/4.22-Smallest-number/main.cpp | 35 +++ cpp/4.23-Interstate-hightway-numbers/main.cpp | 63 ++++++ cpp/4.25-Exact-change/main.cpp | 75 +++++++ cpp/4.27-Name-format/main.cpp | 57 +++++ cpp/6.21-Adjust-list-by-normalizing/a.out | Bin 0 -> 26296 bytes cpp/6.21-Adjust-list-by-normalizing/main.cpp | 50 +++++ cpp/6.24-elements-in-range/a.out | Bin 0 -> 25640 bytes cpp/6.24-elements-in-range/main.cpp | 55 +++++ cpp/6.27-soccer-team-roster/a.out | Bin 0 -> 36576 bytes cpp/6.27-soccer-team-roster/main.cpp | 209 ++++++++++++++++++ {Project => java/Project}/DiceCup.java | 0 {Project => java/Project}/EightDie.java | 0 {Project => java/Project}/GameManager.java | 0 {Project => java/Project}/MyDiceGameTest.java | 0 {Project => java/Project}/MyDie.java | 0 {Project => java/Project}/SixDie.java | 0 .../CIS 217 Project 1 Winter 2021(4).docx | Bin .../CIS 217 Project 1 Winter 2021(5).docx | Bin {Project => java/Project}/notes/notes.java | 0 .../Project}/notes/temp-notes.java | 0 .../Project}/old-my-dice-game-test.java.old | 0 .../in-class-10-FEB-2021}/SmartWatch.java | 0 .../in-class-10-FEB-2021}/Watch.java | 0 .../in-class-10-FEB-2021}/WatchManager.java | 0 .../old}/IN-CLASS-FEB-3-2021/Review.java | 0 .../IN-CLASS-FEB-3-2021/ReviewSystem.java | 0 .../old}/IN-CLASS-FEB-3-2021/Reviews.java | 0 .../old}/StudentClass/MyStudentTest.java | 0 {old => java/old}/StudentClass/Student.java | 0 .../arrayListFun.java | 0 {old => java/old}/calculator/Calculator.java | 0 .../old}/calculator/MyCalculatorTest.java | 0 .../old}/calculator/testCalculator.java | 0 .../old}/exact-change/moneyChange.java | 0 .../part-1/ItemToPurchase.java | 0 .../part-1/ShoppingCartPrinter.java | 0 .../part-2/ItemToPurchase.java | 0 .../part-2/ShoppingCart.java | 0 .../part-2/ShoppingCartManager.java | 0 {old => java/old}/java1/brute-force/main.java | 0 {old => java/old}/java1/brute-force/test.java | 0 .../java1/contians-character/LabProgram.java | 0 .../java1/contians-character/confused.java | 0 .../java1/elements-in-range/LabProgram.java | 0 {old => java/old}/java1/exam/another_wut.java | 0 {old => java/old}/java1/exam/wut.java | 0 .../FoodItem.java | 0 .../NutritionalInfo.java | 0 .../lab-12/12.6-eception/NameAgeChecker.java | 0 .../lab-8/8.33.1-turn-exp/LabProgram.java | 0 .../8.37-even-odd-in-array/LabProgram.java | 0 .../8.39.1-sort-an-array/LabProgram.java | 0 .../8.42.1-WordFrequencies/LabProgram.java | 0 .../old}/java1/lab-9/fallingCarValue/Car.java | 0 .../java1/lab-9/fallingCarValue/CarValue.java | 0 .../old}/java1/lab-9/stupid-teams/Team.java | 0 .../java1/lab-9/stupid-teams/WinningTeam.java | 0 .../java1/lab-9/triangle-area/Triangle.java | 0 .../lab-9/triangle-area/TriangleArea.java | 0 .../java1/output-numbers-in-reverse/main.java | 0 .../java1/word-frequencies/LabProgram.java | 0 .../txt_msg_expander.java | 0 .../CreditUnion.java | 0 .../mortgage-pre-approved-list/HomeBuyer.java | 0 .../LabProgram.java | 0 .../MyHomeBuyerTest.java | 0 .../MyPreApprovedListTest.java | 0 .../outputBelowAmount.java | 0 .../old}/painting-a-wall/painting_a_wall.java | 0 {old => java/old}/palindrome/palindrome.java | 0 .../old}/productClass/MyProductTest.java | 0 {old => java/old}/productClass/Product.java | 0 .../old}/productClass/testProduct.java | 0 {old => java/old}/word-freq/wordFreq.java | 0 .../plant-information}/Flower.java | 0 .../plant-information}/GardenManager.java | 0 .../plant-information}/MyGarden.java | 0 .../plant-information}/MyGardenJUnitTest.java | 0 .../plant-information}/Plant.java | 0 .../runJavaTests}/runJavaTests.sh | 0 102 files changed, 767 insertions(+) create mode 100755 cpp/2.12.1-input-output/a.out create mode 100644 cpp/2.12.1-input-output/main.cpp create mode 100755 cpp/2.13-inches-to-feet-inches/a.out create mode 100644 cpp/2.13-inches-to-feet-inches/main.cpp create mode 100755 cpp/2.14-madlib/a.out create mode 100644 cpp/2.14-madlib/main.cpp create mode 100755 cpp/2.15-seconds-simplified/a.out create mode 100644 cpp/2.15-seconds-simplified/main.cpp create mode 100755 cpp/2.16-hours-minutes-seconds-to-seconds/a.out create mode 100644 cpp/2.16-hours-minutes-seconds-to-seconds/main.cpp create mode 100755 cpp/3.14-pizza-party/a.out create mode 100644 cpp/3.14-pizza-party/main.cpp create mode 100755 cpp/3.15-ordering-pizza/a.out create mode 100644 cpp/3.15-ordering-pizza/main.cpp create mode 100644 cpp/3.16-Postfix-of-3/main.cpp create mode 100755 cpp/3.17-prefix-of-3/a.out create mode 100644 cpp/3.17-prefix-of-3/main.cpp create mode 100755 cpp/3.18-midfix-of-3/a.out create mode 100644 cpp/3.18-midfix-of-3/main.cpp create mode 100755 cpp/3.21-variables-input-and-casting/a.out create mode 100644 cpp/3.21-variables-input-and-casting/main.cpp create mode 100755 cpp/4.22-Smallest-number/a.out create mode 100644 cpp/4.22-Smallest-number/main.cpp create mode 100644 cpp/4.23-Interstate-hightway-numbers/main.cpp create mode 100644 cpp/4.25-Exact-change/main.cpp create mode 100644 cpp/4.27-Name-format/main.cpp create mode 100755 cpp/6.21-Adjust-list-by-normalizing/a.out create mode 100644 cpp/6.21-Adjust-list-by-normalizing/main.cpp create mode 100755 cpp/6.24-elements-in-range/a.out create mode 100644 cpp/6.24-elements-in-range/main.cpp create mode 100755 cpp/6.27-soccer-team-roster/a.out create mode 100644 cpp/6.27-soccer-team-roster/main.cpp rename {Project => java/Project}/DiceCup.java (100%) rename {Project => java/Project}/EightDie.java (100%) rename {Project => java/Project}/GameManager.java (100%) rename {Project => java/Project}/MyDiceGameTest.java (100%) rename {Project => java/Project}/MyDie.java (100%) rename {Project => java/Project}/SixDie.java (100%) rename {Project => java/Project}/notes/CIS 217 Project 1 Winter 2021(4).docx (100%) rename {Project => java/Project}/notes/CIS 217 Project 1 Winter 2021(5).docx (100%) rename {Project => java/Project}/notes/notes.java (100%) rename {Project => java/Project}/notes/temp-notes.java (100%) rename {Project => java/Project}/old-my-dice-game-test.java.old (100%) rename {in-class-10-FEB-2021 => java/in-class-10-FEB-2021}/SmartWatch.java (100%) rename {in-class-10-FEB-2021 => java/in-class-10-FEB-2021}/Watch.java (100%) rename {in-class-10-FEB-2021 => java/in-class-10-FEB-2021}/WatchManager.java (100%) rename {old => java/old}/IN-CLASS-FEB-3-2021/Review.java (100%) rename {old => java/old}/IN-CLASS-FEB-3-2021/ReviewSystem.java (100%) rename {old => java/old}/IN-CLASS-FEB-3-2021/Reviews.java (100%) rename {old => java/old}/StudentClass/MyStudentTest.java (100%) rename {old => java/old}/StudentClass/Student.java (100%) rename {old => java/old}/arraylists-only-negative-numbers/arrayListFun.java (100%) rename {old => java/old}/calculator/Calculator.java (100%) rename {old => java/old}/calculator/MyCalculatorTest.java (100%) rename {old => java/old}/calculator/testCalculator.java (100%) rename {old => java/old}/exact-change/moneyChange.java (100%) rename {old => java/old}/java1/Week-11-final-start/part-1/ItemToPurchase.java (100%) rename {old => java/old}/java1/Week-11-final-start/part-1/ShoppingCartPrinter.java (100%) rename {old => java/old}/java1/Week-11-final-start/part-2/ItemToPurchase.java (100%) rename {old => java/old}/java1/Week-11-final-start/part-2/ShoppingCart.java (100%) rename {old => java/old}/java1/Week-11-final-start/part-2/ShoppingCartManager.java (100%) rename {old => java/old}/java1/brute-force/main.java (100%) rename {old => java/old}/java1/brute-force/test.java (100%) rename {old => java/old}/java1/contians-character/LabProgram.java (100%) rename {old => java/old}/java1/contians-character/confused.java (100%) rename {old => java/old}/java1/elements-in-range/LabProgram.java (100%) rename {old => java/old}/java1/exam/another_wut.java (100%) rename {old => java/old}/java1/exam/wut.java (100%) rename {old => java/old}/java1/lab-10/10.13.1-Nutritional-Information/FoodItem.java (100%) rename {old => java/old}/java1/lab-10/10.13.1-Nutritional-Information/NutritionalInfo.java (100%) rename {old => java/old}/java1/lab-12/12.6-eception/NameAgeChecker.java (100%) rename {old => java/old}/java1/lab-8/8.33.1-turn-exp/LabProgram.java (100%) rename {old => java/old}/java1/lab-8/8.37-even-odd-in-array/LabProgram.java (100%) rename {old => java/old}/java1/lab-8/8.39.1-sort-an-array/LabProgram.java (100%) rename {old => java/old}/java1/lab-8/8.42.1-WordFrequencies/LabProgram.java (100%) rename {old => java/old}/java1/lab-9/fallingCarValue/Car.java (100%) rename {old => java/old}/java1/lab-9/fallingCarValue/CarValue.java (100%) rename {old => java/old}/java1/lab-9/stupid-teams/Team.java (100%) rename {old => java/old}/java1/lab-9/stupid-teams/WinningTeam.java (100%) rename {old => java/old}/java1/lab-9/triangle-area/Triangle.java (100%) rename {old => java/old}/java1/lab-9/triangle-area/TriangleArea.java (100%) rename {old => java/old}/java1/output-numbers-in-reverse/main.java (100%) rename {old => java/old}/java1/word-frequencies/LabProgram.java (100%) rename {old => java/old}/lab_txt_msg_expander/txt_msg_expander.java (100%) rename {old => java/old}/mortgage-pre-approved-list/CreditUnion.java (100%) rename {old => java/old}/mortgage-pre-approved-list/HomeBuyer.java (100%) rename {old => java/old}/mortgage-pre-approved-list/LabProgram.java (100%) rename {old => java/old}/mortgage-pre-approved-list/MyHomeBuyerTest.java (100%) rename {old => java/old}/mortgage-pre-approved-list/MyPreApprovedListTest.java (100%) rename {old => java/old}/output-below-amount/outputBelowAmount.java (100%) rename {old => java/old}/painting-a-wall/painting_a_wall.java (100%) rename {old => java/old}/palindrome/palindrome.java (100%) rename {old => java/old}/productClass/MyProductTest.java (100%) rename {old => java/old}/productClass/Product.java (100%) rename {old => java/old}/productClass/testProduct.java (100%) rename {old => java/old}/word-freq/wordFreq.java (100%) rename {plant-information => java/plant-information}/Flower.java (100%) rename {plant-information => java/plant-information}/GardenManager.java (100%) rename {plant-information => java/plant-information}/MyGarden.java (100%) rename {plant-information => java/plant-information}/MyGardenJUnitTest.java (100%) rename {plant-information => java/plant-information}/Plant.java (100%) rename {runJavaTests => java/runJavaTests}/runJavaTests.sh (100%) diff --git a/cpp/2.12.1-input-output/a.out b/cpp/2.12.1-input-output/a.out new file mode 100755 index 0000000000000000000000000000000000000000..a1f3748c19787b924bbdd24445f51cb6b2e41eb5 GIT binary patch literal 17344 zcmeGjZERcB_1aFGKwHO6%9irg$0#EO#dX>c0<7(G5~t52ZL=gTWutv@Y&WrR?9A`E zOPDme6{>kq79oTX<3}`UTi10PLKAfSpee0L+1Lcrn7W~D9UsHlpp;Tj#VFo6_ugYa zKRX&?(tb?uMDLw@KJR_!-FtKI^F4QmdVAb17b9@9^$aQBQkApBoiX(boRqu{wuq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x95CSsBm>(DP3Grg*bm8DQ0DRRXVSb^`{Sc> zgpJ0)mMCE%MvJhZGB}QmC8AJk8hpXc&npnl;N3Dm4Eiw`$i;c*zbxQ>5vFihO9-I# zI_1aGeo>0KE|n2q4Hxdo$ez~qln1*Kl`KI2hl$k=1*<)+|MCAQg2L~mo84Xm5zhTo zKkZ}dV4g}lUICGGn# zxB&Q!SR{MepKb#ls**kJPfp1O(!Ls0I7oLyGF(sMo|f!sAG2OInBE_?pY#ad3HG>0 zCVFV0%6$(>13{JE5w)Ky!R;=%u&HD}E$yeJ{Se3ysD84i=f4MJXy1uS2(>ClJYY~d zDJX7_-vaFR4*(BiLjD=;n{Yz_K;J_ICF-Iw;v8I7dqvtS(taA1EFjsi<`M7^Agle1 zw4ad*FH>NoKG{i +using namespace std; + +int main() { + int currentPrice; + int lastMonthsPrice; + + cin >> currentPrice; + cin >> lastMonthsPrice; + + /* Type your code here. */ + + cout << "This house is $" << currentPrice << ". The change is $" << currentPrice-lastMonthsPrice << " since last month." << endl + << "The estimated monthly mortgage is $" << (currentPrice*0.051)/12 << "." << endl; + + return 0; +} diff --git a/cpp/2.13-inches-to-feet-inches/a.out b/cpp/2.13-inches-to-feet-inches/a.out new file mode 100755 index 0000000000000000000000000000000000000000..e0d803cd49239465a138e5f379c16a0a5c455219 GIT binary patch literal 17288 zcmeGjZERcB_1aDwmlnrO!WPOPW)v-@itDr?gpbnaBu<}4+Ga^wvW@cU*luFYu_ODr zOBsVqg{mHuMHNEZv>%-`O&!{gYClFn8ck_MyNMrV5~yt2)-f2)U?qGmV-)Y4`_8eS zpB;(ugCEm7(R=6Po^$TK=iPhruHQWmh6ehb4u@cHiaUkmRx46u+=X!8!5Ts+qFbzl z`*q@4u^hy8aIv036yph}VaM2Qu)+lx?T%6TF{c6?@(LpHC3!DnZXsf{D}zF$foJOt zma*^}JlZWol6c`&kON+k=qhXw0AtoG)#sDNLiiMeAUs12V{Ep=*qm!O)X!};>=+-V zelK!os9h*VyNhIZk?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$X|y zHlR_T<1c^90@5*l{=Z;o!})9=ustVw6e*%*R2-1< z>i9nia`eytZ=@02el7K@pW{;Pe@W^$iuxb#`sY{e>MKv=QH%{$Y=-18*x0)b2&nC z{J+%*bigw2eu93SErQQ5k-GQ==`+u`0PSgXR?pK@sPFWM0M*O?PhVNW&x7a(+9^nX z16A=bDO3FO~k9r}<-*^F^T|)oQq>m@W5ICNfKwc})r4C*=YSnuK$bHg7B~29*ZQkeUR89 zrO}L@)pKwZEh=L1Onf|%)#H%!GO0zA=~O%mR+_H6DxT5ut^5KLs@d7mM3$WkpNKw;Js=ObB4wUKST9DdA-!o(u03dYY!8-m7;WwT6! zXG;bYCMa30WztbJn==L?=3~hutR>ZOJjp?gX;wA0jNC4Kf>g}$s!si~v=1}1DqRYH zcK@Uv83U|m3_QV9A_bFVO88T0J?0eK-5%H7k)We{gAH(vHVm=#BX!um_q_!Qs(eDYq7i@}!0J+a~#5N3Pc|G9mJ#sDi4w$^X#AIkOfK5>-n z+t9fQ`1!GD4hVQ_m2&`P{CgDVnOoz<_KaTun+B6T|6X;0^6*&?eIqc>_yWjq?9g;A z?MFC|pY!!`{3Ea(x9hJU!!EKt?_(F}1)TNJ7J=;<{~csz`_g_lAl1dFfl7C_WBj(o zp5M1e$$qK&+2IF3pf7I!jH1Y*39?s8151j9QEJe5{|GK@KdGZg0^8$$*9@qOV8)gz zWcdklxIhyd{|{kEx!=5gtN +using namespace std; + +int main() { + + /* Type your code here. */ + int totalInches; + + cin >> totalInches; + cout << totalInches/12 << "'" << totalInches%12 << endl; + + return 0; +} diff --git a/cpp/2.14-madlib/a.out b/cpp/2.14-madlib/a.out new file mode 100755 index 0000000000000000000000000000000000000000..16861920954e6dda3c5ddd48278a30cbd0b6c5b4 GIT binary patch literal 18064 zcmeHPeQ;aVmA{gl*lB{Id{9DIng>f6QZ_<%oZyxQo@~pJ!35WKXu559ktNwyktMJ6 z6l?~zrlCySB&?^iWixa-_4I2p-I=zt18jzNL(*hOpq;5p2P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^}>(kNS6xhGrRoKH%h2qrb_1r7{y*a~H`#s2d;@u=1}xnpSslNB{wrQ6ryWiIRY zmno`3zEW{QR}+$7)CRw;1AjHB?YQ{4dHkVahJBZc`gXKSRj%d*pr&)XEK48rdiqc9 MP!gBB6kMqIU&0OqNB{r; literal 0 HcmV?d00001 diff --git a/cpp/2.14-madlib/main.cpp b/cpp/2.14-madlib/main.cpp new file mode 100644 index 0000000..fed6111 --- /dev/null +++ b/cpp/2.14-madlib/main.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; + +int main() { + + string name; + string location; + int number; + string pluralNoun; + /* Type your code here. */ + cin >> name; + cin >> location; + cin >> number; + cin >> pluralNoun; + + cout << name << " went to " << location << " to buy " << number << " different types of " << pluralNoun << "." << endl; + + return 0; +} + diff --git a/cpp/2.15-seconds-simplified/a.out b/cpp/2.15-seconds-simplified/a.out new file mode 100755 index 0000000000000000000000000000000000000000..cce21bbe3779a679de87582d8c855c230b68b15f GIT binary patch literal 17288 zcmeGjZERcB_1aFGK#Suhfdx9&$CuQC;yP^z;iL39iPPtiwpl((_fcLQ+l{R`c4R+y zDVs*7vI?)1MF=4}?ML?qb!b1jNgD-eG^G{k20y|irm|^}G1!v9N`L|xqj=}scaHP? z>_~_o{CdZF?|j^I&b{}%d!OHZ@16%jy*+N1OE9>_-9mC}R4FpgLe$;G8bYX|L#%@H z*Tl7AC5UU_U_F&6#tFA+$GFa9g$FR&9jEf+ZWTD>RYc;e^1Ot(g^1B^2~;9YJXve9 zjD^qS(QXBj#0#H_9Pp|{d2A2>W7aFxr^sR<6xAdMKS2#+Y_-GKoNF=F&uua77$2j4 zFLGz7T_{GoS+biYJH|e;W6beHH+Y<-^0RIgIOJ7CqFbJqFzO=oy=BCZRutqAt7W)X zazZd>yKjIUw)67>hrOTbTP`jg)PBYkUa>Ki9Byyhn2NQelIi?-%Xmk7OM9C?m+^0s z{ceJW;3eF)V@N!1{CdNlt=GS{_SD_;k3D%Lp&Tu2!FFRC&>!j`pg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=?3_ zi`^zFo!O4@yEc1%-ri02%hk^gaXo{+xcw8VDvJ_iua*Xu6brM|r1AU-9N2zRN09`! z$MvoiP#3|9ZB@wfljLxLCN};LVMw{(eE-1rcHDMpNT=hsnZ&)eLavu}*8pKtkwwKj MObw6Cz{ZOI197$asQ>@~ literal 0 HcmV?d00001 diff --git a/cpp/2.15-seconds-simplified/main.cpp b/cpp/2.15-seconds-simplified/main.cpp new file mode 100644 index 0000000..35ee7bc --- /dev/null +++ b/cpp/2.15-seconds-simplified/main.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; + +int main() { + int seconds; + int minutes; + int hours; + + /* Type your code here. */ + + /* get totals */ + cin >> seconds; + minutes = seconds/60; + hours = minutes/60; + + /* Get remainders */ + minutes = minutes % 60; + seconds = seconds % 60; + cout << "Hours: " << hours << endl + << "Minutes: " << minutes << endl + << "Seconds: " << seconds << endl; + + return 0; +} diff --git a/cpp/2.16-hours-minutes-seconds-to-seconds/a.out b/cpp/2.16-hours-minutes-seconds-to-seconds/a.out new file mode 100755 index 0000000000000000000000000000000000000000..0b6235ad0f87fdf8c96ae42daff2783aaaeeb910 GIT binary patch literal 17288 zcmeGjZERcB_1aFGlorQLQkKG4AGAm~G3JH|C8DLjDD?gYtCxK*H#RuPFW%KIYb79vKwMNp||;;Cwr zWGs9pjdshhNVM>&NCB-%v<4dlz?k)l^(j&;grb@S!pEp#jIDMUn-`l*^%r-Tc8sT~ z-&eUa)GlPB-7MM7k{x3o*)isLq8q%RT!8#1k|VMWchlaSHXot zi0i!$$_%K#5-uD^*!LB1aXiouJ`2=AKH8h{@xk8qp<05OsqMJA4SZEcxK0KOE=~*L^F?3z% zU)$4{$Yevk30X`hvmq??87=WtEE$gW8O_bnkw`{2GLeLl4M#(vUf^vTiewW}J)Jc& z@yKYnU+)j-p}to1*Jo^tCQ{Oy(UwSObx@7Bgi{HlvpICQSW8b=Z(q7k4@rw;HvH)- ziuOY_cj!I$MJrX%VO9W*kEU}5_I%XrG?a#;Q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-La#j(Tn^L~W$_&Hx6$3Ftwal8HwJnSOd^FDTgUcgxoZ4ua>@jroQwJ+{>15#b= zH&OA +using namespace std; + +int main() { + int seconds; + int minutes; + int hours; + + /* Type your code here. */ + + cin >> hours >> minutes >> seconds; + + cout << "Seconds: " << (hours * 60 * 60) + (minutes * 60) + seconds << endl; + + return 0; +} + diff --git a/cpp/3.14-pizza-party/a.out b/cpp/3.14-pizza-party/a.out new file mode 100755 index 0000000000000000000000000000000000000000..7c1d0566002d73a9d59cf9f8f9648a7ade422bb0 GIT binary patch literal 17984 zcmeHP4{RIPd4D8jORimtmX%J4x0+2-Ku#@&vSm+6;QAaQD6M@B7~O-o3kfyicDD4-L9qF2ThuJ}d~+HfoY&orPHV zutXKDSF9JBc)$2Pu@;mj9Gc`1v}z0|-4=ski<0vIlHM7`KjYSb5v~yszbnsW$Q}|T zy>ii1Rl#)%W$3eT(py7Sg$tiX7;sI3osua8LzXMG=a*ta_$_&ci^_k7c0G#CVD*qYsxZj;h9^Tb+cPieMN>1lyyJmZL zb?xd2WYdA|vfu4+gyz)VeFwxF-+E-v@+Y6kyyh8r`o}+b`P;MiJ#&rxCLhQi$xtDA z)tszv1Wq#V!Lb2{y?BAJEDc#Jj%FMbf0}CV#XD;n{LX2r{g%dK6?lTEUd z{bIBG12_Z=-xwlIg#>7;5+Q^#GjAQ z@Qc>>|5`tBtwo<-vvfCZ&!1i}-Nh^ViHj{4WLSzje*|*zgFnH!b&G}?;giH$S}dY` z@E-}MM~kH^68|pYZo(HN{ttxHBg4{j690R`=}}?nX^Fo;I6WdPotF6D5KfN3*RW?6u<6&kL17eu%7>se&Q#~ zBl{zl7W}tpLcetWxpo4Vf^CS~Esq3*SUFAd7sdmvTTV&`PM>`Yjp)1SY;HPBG#Y|+ z=ZH{T96xP-pq%li2@_vq(WJ-X{9{X6fN8%q|Nl?A6hwLiD}W)KbK zHp$K$LuX!E^D|If2QO5$NAf@WOxXt+zZ2KA>#e>uSMZ>Dy>(-FSwF{*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08#j`jTio|JDB|9rcKT4kx#-ychn>Us4` z&|SC-IOl^kAe*Y@kM;e3wV!vO<1SG>PwoM|t5Ppl_sIFLk}}ee|nR9`mYABlAM;Ndo?rvcq4rNG48iksWu3 z;BTFn{toEmr{?hUR(I|Gc7smxK_%a+4BZRI+T7LaLxk+Oy<$eq!!=4iTE~7b;?qX{ zDEYgU{GZm5U#LUxghrW2D!sDocUMmmhK`AdqD^5Ak{S_1oIax>kOQ6efQT}sGzOLjK zeOje8WAD%deW4-4$mR|k5reWr05);X+nLy^wlo3m%rxRId#nY@5H`AG{5zWntSbAzEl`s?WKyPqY zu(psfjs}cqCKEksB&N;GQ8Av0P9=xY+qqojv**zmiFnkE z%D_eU$($u4f^4M0DRVp(oyd+^Sx}VvM5#!XX+6r4%EB=s4f(7Oxk^ZV_SO8-d;E(-OLsx5?| z@czhysFNt`^LubmJxK7r4(U))<}3tfdT*gU71rnXCZXzxqa5>{-0F(eahgX(qB~ie$`>pr@bhr z{%1iW5w9P{o>6q}W zr_{w$4t?H7=u{hbyx++34s+sZrO)vfe$5i~TL7PfR}_vP6VISR{8c9vr(q?_ZqtTPmGwSXpqkzW_Sk2IVzCBD{~v{~y5_FV<)H3UugQOI>cI_t~pm zWUV}3EUb*P{#7t&?yx?;C-eWG;QuqBrekUTv0p!gF7==Fd4FYDz4)*kL}cN18NLpx zUB9#s6SU-KEl@hM9>bqI^!fd2R_WJkpAEi^3fW@+7c@<>9#i_7WBe?x6p^Q2<4pc5 z@e+geX&=U3NS2BnI+~FDtL(q(DBXuBq}*>_Kh}Z9zDq@QD)d^FR~-|U+hy5}sMON` O=59;E<4|y*;y(cmM8$Og literal 0 HcmV?d00001 diff --git a/cpp/3.14-pizza-party/main.cpp b/cpp/3.14-pizza-party/main.cpp new file mode 100644 index 0000000..f6a0653 --- /dev/null +++ b/cpp/3.14-pizza-party/main.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +using namespace std; + +int main() { + int people; + int numPizzas; + double cost; + + /* Type your code here. */ + //people eat two slices each + // Pizza has 12 slices + // costs 14.95 each + cost = 14.95; + cin >> people; + numPizzas = ceil((2 * people)/12.0); + + cout << "Pizzas: " << numPizzas << endl; + cout << "Cost: $" << fixed << setprecision(2) << cost*numPizzas << endl; +} diff --git a/cpp/3.15-ordering-pizza/a.out b/cpp/3.15-ordering-pizza/a.out new file mode 100755 index 0000000000000000000000000000000000000000..4f3d2cafcffdafc945814fc55a0edaf0d4d6da4c GIT binary patch literal 17880 zcmeHPeQaCTb-yBIORgP?mX%fcSj;);;G_{F*@~(paPugM@?#_0swJoHV&{n>DTym3 z3gn|JXZ7YlZ7@!DDs)*l6v5yYMPYPlVH8E?<&RjYjo8clhdQi-v9*ZOBpa2gsp`ss z5IEs}=e~Q$$43(V7%&tAufTWi`Ml?zci-i^m-px|f&=}ox;nwdB|a$#^KI26$+`-0 z_>&SMaUi! zB)wwMRMmnbssV<=Yq3dh1636+yc%J^H3<$$rVtESuF#%OiXkwTJj0ywpP^lkVsoX< z(z~+9(qni|>8*2TlwU+9y(Oi$r1Thil^#QmCz+woCB?tw(tr`J5fFXyT7)D^W$l0VmtUBRwllUOZ+kl1BE( zM*6D_u0Q%r*4tas` zls2Q0kAIxTP?s=_@yXkiCPebT3MR(E)ENbJCh><3&gXj?scw{DQgw5DY9F`1XsOV3I z5vRQap`Ko2mw%W4L92fFu(8`uci)9Sx4c?4i$ZmJ4(ssudE9#*Z<*WUcpTm0j2aKb zrz-KOnD>4KkGo5}p!lngYLZUREYGb(ShvyX`R2mojh=scrn&IAB|6OmTw2xmq`5;i zDOo-no#qEFJ8g98AD4C;o#q-Y-8MSU)x^_mbe^k-uG{GL`FzkuCttZ7w$bf#`}*ukqdvD``2oBRd}+aSdE*`MmO zZ>@z#O2m+_=Q-TC;5wG{-*6;ln%_FpFtz~9=e*_&J&G7 zyy*fF@=Ig$7srai6yKMn{L}ABkX_YZdG}HMm36mX_p1KG56!Iw3k}MGQ=i&Dx#uVC zXehHycIGK`=G6`V0!r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g5AeR`Ne*x}(1hbRQv4C)%j+{rV{AmGW=eq`VX@xeS2rE1_7(6IJ9> zpv(9xKRN!-DES4)coxRqfdf5(0mDdVMvag`Nh1Ep^t4QG8R#~QcruP$8f210W@e1> zL~=BoFpeQXM^YmxGi_#Y)Gi{Tu~ck4o;G91-I+8ZiR4r)4XtRBm7-=cl{Uhe84*cN zPA6h!Eb8xW?`p3sWQ?H!Bb-Wwj~lTmGj&{yrNWajBbu3bGSAN5a~V~Oy1ddSLkq68;OJt|G((KMNcqf&2-&;exVMB`INCLN0k znWpo*r$jky8_{&qmVWeV-WCV#ulwM>a zJ8L?QCNNAm`$$<*$wt3px|GwM{X-m5%I0!#jp2R0eAD50c&f~Cd0SMTl|vZ{501rW zVp03uLWk%!TNzY9M$>7oBa^LoS7pK(rExioTKQLzbjEsKR1p5x$!CsMN?l3E%&}m3 z&)cnRxn!!GMbCeCCJ!IMLU^6DH7In&7$n{RP>uAfZsa~MIOJ9fdzLMok=3+Mp{A#aD0CUK zG_0w{(%?D_hbQ9^w3>u1T>P>D%NRzS@MFfD#4K3hd*HVv(LMscLh){C6<)t_zBunA zD7KX4I>Ec~p|v{eUvg={iuuv^NUV6l*G@_40%q6e^&sbY`%0vX`xs2tQK9crZlCuz z8u2|$WzYgDH@JL1q!0Y}us6W^yuLiF^gFBQE3(*+3av3%pVy)DN`Hcai$Z;*Y9k>i zyl?S1>Lkkgyk6yeb>43w9V*J4h2To-3)<^oeO}j|QyVyUDM{YXVL67M1E2Oz80Yox zqEgV5KHnquUy;RAsL(xSeO@PfNdaXtP^}en))Oa6|N zi-i?&*1rY@jUCqK^(_Bi2>$;MYB(0gAN%zNbgBQW&-);&YT?3i5Rrx3W%ys9+Vu +#include +#include +using namespace std; + +int main() { + int numPizza; + double subTotal; + double totalDue; + + /* Type your code here */ + double const cost = 9.99; + double const salesTax = 1.06; + cin >> numPizza; + + subTotal = cost * numPizza; + totalDue = subTotal * salesTax; + + cout << "Subtotal: $" << fixed << setprecision(2) << subTotal << endl; + cout << "Total due: $" << fixed << setprecision(2) << totalDue << endl; + + return 0; +} diff --git a/cpp/3.16-Postfix-of-3/main.cpp b/cpp/3.16-Postfix-of-3/main.cpp new file mode 100644 index 0000000..ffabfb0 --- /dev/null +++ b/cpp/3.16-Postfix-of-3/main.cpp @@ -0,0 +1,17 @@ +#include +#include + +using namespace std; + +int main() { + string s; + string result; + + /* Type your code here */ + cin >> s; + result = s.substr(s.length()-3, 3); + + cout << "Postfix: " << result << endl; + + return 0; +} diff --git a/cpp/3.17-prefix-of-3/a.out b/cpp/3.17-prefix-of-3/a.out new file mode 100755 index 0000000000000000000000000000000000000000..da7b245252b34c5765ea5d6f3f53f652b274e733 GIT binary patch literal 18176 zcmeHPYj9h|6<$e6>@-19oKQk2L_7=4M6nXb7$|UMTh28xiLn!!KEkyu$+jl4GYBE%hQ>5GA(U0oeoVO1k+>)ef$W0O{Ns;VW5@!pe~S3XankZ_U@7I z)uW|h%8#PW+Wd85+uF3q^Yb0+ZI_U zL*cV<(wk3Ng$tiX7;sI3(_|15LzXMm=a+0D{F;?fa7r1*(5^?md1j3z{>+V*9>bHW z-EGn+$SAvrOnTEwZ(8Xw^eH`t>`(FuJ;xRQxLX58xJE#9%J&>3SxUVxn=#7!{DcwI z9I!`XLNH{#+n`5wzTL!b?^E^F@=KetpP_QESer}?wzjNI#?~YgsoeOQ@wV1Atu29U zI= z@UWfSPA_PbXjmh&;EEY@kF#qCw^?8_5Qe zvHb0GU+P-!A{v!L_GZ7(;J)wR?o*Lz!u2Ig_WxW4%=v#_(u5 zWn|4r#xx9Je5~J0X1k;PW-u5XiDV2j6G@mLg!?0Sh5Nu*KN!g-qDDGvX5x|2?ybhw zW+U8xtbH915VMNErgTdfBOA11X)Npryi_yQq*cvp#VboDuu4cs@!SF6=T}wO_ zOI9=R-`Lhl4cok_rgb%IZO!K3txR}yRMx#dnn+pZwezPT-&Y9At%-b6=iHZ?ZyL$V8!H^xbMk{i|(WsFnEGUd^sXG&?n9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O>Ny`~75Fb&q?MMu|jG<7(pxM_Fs|;%{waVZ;s)~#zqEJbrbi4wxN~?Hu zya-@P7{xTt>(@Jlv=hLe0{ENPO1ux{xOhG}2~DS=@yT^(pJ~ zet)mhA5el^KkIY*?^pWmN{-J33QC{P#YmrY%Jm-sjr_{x3;w$jTNFw(zU`@e{N=&4 z>-&|yU+K@oy;+YT{nsmY zecmVTRrp`Ol7hCQ<^4O2bI3Y14}7bT!jEER`o0K5`*=-OB5?Zwo-OXB=8g)&t93yjCq Ao&W#< literal 0 HcmV?d00001 diff --git a/cpp/3.17-prefix-of-3/main.cpp b/cpp/3.17-prefix-of-3/main.cpp new file mode 100644 index 0000000..b74a2e3 --- /dev/null +++ b/cpp/3.17-prefix-of-3/main.cpp @@ -0,0 +1,17 @@ +#include +#include + +using namespace std; + +int main() { + string s; + string result; + + /* Type your code here */ + cin >> s; + result = s.substr(0,3); + + cout << "Prefix: " << result << endl; + + return 0; +} diff --git a/cpp/3.18-midfix-of-3/a.out b/cpp/3.18-midfix-of-3/a.out new file mode 100755 index 0000000000000000000000000000000000000000..6c88807c954f27de67061b1a795091b2ca48d236 GIT binary patch literal 18288 zcmeHPeQaCTb-yHKONkYV{z&84OU0zg;KVR3*|MT0i}NUn@?$OAs$^>IY!-X^9Iz zRPxc4jk$B`CJXDj(~7PiLH{uJ#~`d(4#A$&7O^X)Bx^6;|He}mnYGb!< z5r_Mo`|cs%;|JDyTY+J`0N=Ui^PYR&efRQR-orl+jgGioF2Thub_>F0)@qVuU4>Y9 zRHBMDAl3*?bc?r&)u6QDqe%`ytHyBJZ7~>jC^-)x>CG$tyjufCxJE$yfxK2Bdq|M< zszp;(3ofj&P=>;1;iR{UstOlAjWFPv1otVU3|X$yo?nUy;kV=&E-A+t+VvYR_V;a1#HO@r z*@6CT{e6L4Ca^>HdjlMyF|}v^A#v#k^Trq6HQ%=Qt8bn%?)t`WzJB?=e=7S3KG`D~ zDkQI(6Khc?8w9CvKf5ecbOPR{>UKcGZ9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JOdx|8?;Ha?tZbh4t94*FmHHvp(-Ht*94WmLpv%tk3W| zXmK*u#|$uRR}<* zYF~+07_1+zP^=31O2rOqnvnbzW$+~x_`5*u#fSUN^AAl^?7LJ{m&F0A@-J#0W*)c8 UI6dZ#^gp)SlDNG_p#~NI33e(U5dZ)H literal 0 HcmV?d00001 diff --git a/cpp/3.18-midfix-of-3/main.cpp b/cpp/3.18-midfix-of-3/main.cpp new file mode 100644 index 0000000..70f1822 --- /dev/null +++ b/cpp/3.18-midfix-of-3/main.cpp @@ -0,0 +1,18 @@ +#include +#include +using namespace std; + +int main() { + + /* Type your code here. */ + string s; + string result; + + cin >> s; + + result = s.substr((s.length()/2)-1, 3); + + cout << "Midfix: " << result << endl; + + return 0; +} diff --git a/cpp/3.21-variables-input-and-casting/a.out b/cpp/3.21-variables-input-and-casting/a.out new file mode 100755 index 0000000000000000000000000000000000000000..bd0a2229a26e47ce745c8525430443cf2bd9c94a GIT binary patch literal 18376 zcmeHPVQ?GAbzT4zNm()oiIPLhadcAcRE{eMlqj0AYx_VF6kyXbLrM66r_?Tz}zCmJel2ost<8H|crp<~K9-wG9Px5)U4jl4267f-aE>rdp zDcY5jPFY0*s};*s_!N(JD=l-m>A1dnqhKj+qgLtaNBdgZxHQ5Vy| zPt7>yhc)Do>J_wKazZd=yHA20H5qAqIN@d=r21;LOBeail>2>KDml{Gu`Lzfno6eg zQ(LFHI=6Oq_;VTmc6r_Fpn4oryZ7u94QnQz{r)#RZ@jy$_4&o;A2`4IuUapo-{=FD zhdP*0pQ;mUApa3KupCS`!h!O&aNGcg7mgM<*dNHsgv0G7IM5!;UkS&rOXy3hLkZh* z6&&mj_Un4m!6DK_dG-nYQ0?z?Z*r}3p`TbL`k(u1lY7&(D=XKXSlu%fdE$jTLjS_u z2hz&)bzsrfneGHfs^QOqVl~_Yj#b0|x`zJiZ~@iyzg+|0SfiXw4L`AmtChd8M)|EZ z%2{7S|E(JOz8dX-V?%?(nO4;(|0{s65gWv%pe{|?f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vnUUb~QTrcb5ZC=fO@jj)2|A)e! H9IW_nt7ud+ literal 0 HcmV?d00001 diff --git a/cpp/3.21-variables-input-and-casting/main.cpp b/cpp/3.21-variables-input-and-casting/main.cpp new file mode 100644 index 0000000..78f5c5e --- /dev/null +++ b/cpp/3.21-variables-input-and-casting/main.cpp @@ -0,0 +1,36 @@ +#include +#include // Supports use of "string" data type +using namespace std; + +int main() { + int userInt; + double userDouble; + // FIXME: Define char and string variables + char userChar; + string userString; + + cout << "Enter integer:" << endl; + cin >> userInt; + + cout << "Enter double:" << endl; + cin >> userDouble; + + cout << "Enter character:" << endl; + cin >> userChar; + + cout << "Enter string:" << endl; + cin >> userString; + + cout << userInt << " " << userDouble << " " << userChar << " " << userString << endl; + + // FIXME (2): Output the four values in reverse + + cout << userString << " " << userChar << " " << userDouble << " " << userInt << endl; + + + // FIXME (3): Cast the double to an integer, and output that integer + + cout << userDouble << " cast to an integer is " << (int)userDouble << endl; + + return 0; +} diff --git a/cpp/4.22-Smallest-number/a.out b/cpp/4.22-Smallest-number/a.out new file mode 100755 index 0000000000000000000000000000000000000000..66d716ed6053d2cd8eb5c16331e5f829308f3657 GIT binary patch literal 17184 zcmeHOZ)_aZ5r4jOVndSi#WAfRK$Zfk1M=mZ7~>En?AbnNuXPgFPAF{&oAcepKJ|PT z-R%X3O6^h8C`SmjP=zSsgR6cq6(49-wE?LlArYa7N&!lh7HC}xtxW^C5Ku%3*O~Wb z&U^o)ib|DQ?Xz}g=J#giy*K-Iz3=wTcY*``uDUwG#U-`~loq_Ygw$Dx=}l53tXnJ- zy0}_gC6)qG4~H&mkSdPpm`hbKZ6rN6P_&z&`WcrF63RLfaiu&jQtlyAv|B7Xv5K}e zD3Ph~DjDsTAWO2K@iDy~I|PL(>lNG6WVH~Qt{9>d)G?-ZJB-b9?MnT*&B~7H!!+&- zJQ(U1!e}>3cC%#1)Jt|uIiBbSk5g2C%B6#ZvW`Ub$@3ybT`YrdSyANcHI$I*C3HYa zLNH~!uYeu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 zF}e%JqF~FCvQRTxSuhWd!{hM?w3-56aPr9plry-9!Us3zINWT-XTyKM;Cc)mrSQL7 z6@EYFyjxz6QMJ@%9_h7k;F^c+`8}HROs_*FTjBqE40Qoxx99imIdZ76BGGbt18{r> zbNjqbY;-GwKC~(61uMzj3U~xAv*j2XImg=%fqXzd#X)!mD?YUp~LOt5|kY0}Lb7Vhbv&Xe|x%~rx zVN7^@g4Zed0uF_LZ%~qIi+QAZIPCTs*=uB0FGd&9^&K+)_*9)9q&w2DX|FN(g_v_Dq;SkxL*O?3Sg3Nkoi-ql({uMC0z0h@3 zQyU+E3`$|~#CA;IgDSf{zb6m+l})Yo+2e=6pfB!!j@sWt_Bu}tGSG=K`4|{%pVS!^ zY>(?vdqG_+c3Reitbc+Wo~0Wb{|{kEdEET`z~9rj@6wP?hi+C(b6F*~%epIpDN~VE OkKCd(++_x3qWBjG>W4i5 literal 0 HcmV?d00001 diff --git a/cpp/4.22-Smallest-number/main.cpp b/cpp/4.22-Smallest-number/main.cpp new file mode 100644 index 0000000..4341522 --- /dev/null +++ b/cpp/4.22-Smallest-number/main.cpp @@ -0,0 +1,35 @@ +/* + * Write program that takes three ints and outputs the smallest + * so if input is 7 15 3 + * then answer is 3 + */ + +#include +using namespace std; + +int main() { + + /* Type your code here. */ + + int num1, num2, num3; + int smallest; + + cin >> num1; + cin >> num2; + cin >> num3; + + if (num1 < num2){ + smallest = num1; + } + else{ + smallest = num2; + } + if (num3 < smallest){ + smallest = num3; + } + cout << smallest << endl; + + return 0; +} + + diff --git a/cpp/4.23-Interstate-hightway-numbers/main.cpp b/cpp/4.23-Interstate-hightway-numbers/main.cpp new file mode 100644 index 0000000..a91e5b7 --- /dev/null +++ b/cpp/4.23-Interstate-hightway-numbers/main.cpp @@ -0,0 +1,63 @@ +/* + * Primary interstate highway numbers are 1-99 + * Odds go north/south + * evens go east/west + * + * Aux highways are 100-999 + * Right most two digest are the primary highway it services + * + * givein a highway number, indicate primary or aux + * if aux indicate which highway it serves + * + * Also indicate if the primary highway runs north/south + * or east/west + * + * input: 90 + * output: I-90 is primary, going east/west. + * + * input: 290 + * output: I-290 is auxiliary, serving I-90, going east/west. + * + * input: 0 + * output: 0 is not a valid interstate highway number. + */ + +#include +using namespace std; + +int main() { + int highwayNumber; + string highwayDirection; + + + cin >> highwayNumber; + + /* Type your code here. */ + + if (highwayNumber % 2 == 0){ + highwayDirection="east/west"; + } + else{ + highwayDirection="north/south"; + } + + if ((highwayNumber < 1) || + (highwayNumber > 999)){ + cout << highwayNumber << " is not a valid interstate highway number.\n"; + } + //Primary + else if (highwayNumber < 100){ + cout << "I-" << highwayNumber << " is primary, going " << + highwayDirection << ".\n"; + //Aux + } + else{ + cout << "I-" << highwayNumber << " is auxiliary, serving I-"<< + highwayNumber%100 << ", going " << highwayDirection << ".\n"; + } + + + + return 0; +} + diff --git a/cpp/4.25-Exact-change/main.cpp b/cpp/4.25-Exact-change/main.cpp new file mode 100644 index 0000000..70a0ddd --- /dev/null +++ b/cpp/4.25-Exact-change/main.cpp @@ -0,0 +1,75 @@ +/* + * Write program that takes an int + * it returns the change + * simple simple + * + * input: 0 + * output: No change + * + * input: 45 + * output: + * 1 Quarter + * 2 Dimes + * + * Do Dollar, Quarter, Dime, Nickel, Penny + * Note that 1 dollar and 2 dollars matter + */ + +#include +using namespace std; + +int main() { + + /* Type your code here. */ + + int runningTotal; + + cin >> runningTotal; + + //Forgot none so haste + if(runningTotal <=0){cout << "No change\n";} + + //dollars + if (runningTotal >= 100){ + if (runningTotal/100 == 1){ + cout << runningTotal/100 << " dollar\n"; + } + else { + cout << runningTotal/100 << " dollars\n"; + } + runningTotal %=100; + } + //quarters + if (runningTotal >= 25){ + if (runningTotal/25 == 1){ + cout << runningTotal/25 << " quarter\n"; + } + else { + cout << runningTotal/25 << " quarters\n"; + } + runningTotal %=25; + } + //dimes + if (runningTotal >= 10){ + if (runningTotal/10 == 1){ + cout << runningTotal/10 << " dime\n"; + } + else { + cout << runningTotal/10 << " dimes\n"; + } + runningTotal %=10; + } + //Nickels + if (runningTotal >= 5){ + cout << runningTotal/5 << " nickel\n"; + runningTotal %=5; + } + //Pennies + if(runningTotal == 1){ + cout << runningTotal << " penny\n"; + } + else if (runningTotal >1) { + cout << runningTotal << " pennies\n"; + } + return 0; +} diff --git a/cpp/4.27-Name-format/main.cpp b/cpp/4.27-Name-format/main.cpp new file mode 100644 index 0000000..bfe5705 --- /dev/null +++ b/cpp/4.27-Name-format/main.cpp @@ -0,0 +1,57 @@ +/* + * input is: + * + * firstName middleName lastName + * + * output is: + * + * lastName, firstInitial.middleInitial. + * + * Ex: + * + * input: + * Pat Silly Doe + * + * output: + * + * Doe, P.S. + */ + +#include +#include +using namespace std; + +int main() { + + /* Type your code here. */ + + string f, m, l, s; + //getline(cin, s); + + cin >> f; + cin >> m; + cin >> l; + + + if(l.size() != 0){ + cout << l << ", " << f.at(0) << "." << m.at(0) << ".\n"; + } + else{ + cout << m << ", " << f.at(0) << ".\n"; + } + + + + +/* + if(true){ + cout << l << ", " << f.at(0) << "." << l.at(0) << ".\n"; + } + else{ + cout << l << ", " << f.at(0) << ".\n"; + } + +*/ + + return 0; +} diff --git a/cpp/6.21-Adjust-list-by-normalizing/a.out b/cpp/6.21-Adjust-list-by-normalizing/a.out new file mode 100755 index 0000000000000000000000000000000000000000..ed1e3cdca657801f2b8e502999fbbe2ef87de125 GIT binary patch literal 26296 zcmeHwe|%ikb?4Pc{s9jXfPqxN>0?7!=A}+0Y9*;)Wgpo8m zKaA`|jX>b_bTH9oOX^R%{X}W=$wzJZH0t(~RLcgCv4h=wTq3e*sy2`)ENR|Q7u4Eh z9pXg$J?Gy0-kV<}X?OFNFKEuY=hr>=+;h*p@6DU*PlejI`>LvhEMSKRpFY&Rl*Rf#SLOHFg5rym_krqY1rqJ1PzxezG^^{n^5!#pMe_H4Fcjn@TUv4 zg#<~?Erz<3@c1%W)lm3lo#YnLrK$_RK{eD32G3s0KxnA>oc4l}E`pL@!_KQDUPG@O z`R2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IrM>YTne5FC)UwD>X=L34kSx^TWMF*h#}|w44u3hg12$xsysuJLWOqt z907DLYRL$ePSU$LF?ruSmR&2|PHpsTF)L-pyY!x%aw?}2Zz%K5pKpeW2B?gWV?$&| z>AABFjR+3sY*pD+#F7;~x`igeD$%LpM7)(d&aeq?3KNG{@+OZym!kMPGr^5#X)B3`x zK2hIuXaM>oOeZBpeO+2mu|UHb7$yOAm58TBJ#An_J&s((C&xy8a*%Ie>Z5(?ey^_w zvbqMPILXy}uPk-QyE&;tU!$pTe=Gu#L1@QEJvS-UBZG^2+?4j?M$@?u|94(o4|zOt z!*@NhO!y4Gm{17)o`a-HUVTlFo`>O)rXzpKXQ1Yu-+nXK+>aXflCL)5(<^WL49454 z{Q%e8k79WfBzk6}?bq*LEUlI@Usa-bJj?};DYg& z2O5=P|LOie2^z_7B_-Skmo@8|UTK*Z}$R}FA@EfS1;43LA6yM%LZFx%; z6|a0i$p@7DNRh)8TB{eoTO_Z)*BxIjTlv9CZ)=WO4)XVl+j+ChX%k8;Llr%QczSC z(?#<7J%*XPrND>;&S!D^-vkAZC^UPPm!+t={Bz|nUSYPvh$BhTJL z+%CVYxpgi7HV71ZT3)|Dq5s_rzZw{tKUB1ww(C4_ zEAPCIVGuWdQzL=%spT}J_dUJx`ums}LyA;tUn^V!VbZ1T*WV+}DS5*QOevwzvVzZL zs{NpYkr!INtq4!HQt`r~CYT; +#include +#include +using namespace std; + +int main() { + + /* Type your code here. */ + //Take in values + //Divide all values by largest value + //input begins with INT indicating number of floats + //Output each float with two digits after decimal + //cout << fixed << setprecision(2) once before other cout statements + //EX + //input: 5 30.0 50.0 10.0 100.0 65.0 + //Output: 0.30 0.50 0.10 1.00 0.65 + //For simplicity, follow every output value by a space, including last one + + vector userFloats; + int unsigned i; + int numFloats; + float fltLargest; + + cin >> numFloats; + + userFloats.resize(numFloats); + + //Get numbers + for (i=0; i> userFloats.at(i); + } + //Find max + fltLargest = userFloats.at(0); + for (i=0; i fltLargest){ + fltLargest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Yl2Dq zIpsY{-lOFCyVMQ=h1TlD13B{g{aW`NDHK#ttI+bg{)HTQ{l0c|k>t?d3(@@KD`z=~ z3fZsyuiu~W7sP?T6MxQj zz;)v>UXXw(CvEQvbEQe&0Q*Ud(7duyE1x8lDE$DQ~|Q z_euUC3G7cTry+e$(J8N=#}6s_LhWmXvmi{mwEg=1!f_?dwft;%NPc!K-2LJ#7 literal 0 HcmV?d00001 diff --git a/cpp/6.24-elements-in-range/main.cpp b/cpp/6.24-elements-in-range/main.cpp new file mode 100644 index 0000000..1f92c13 --- /dev/null +++ b/cpp/6.24-elements-in-range/main.cpp @@ -0,0 +1,55 @@ +#include +#include +using namespace std; + +int main() { + + /* Type your code here. */ +/* + * get list of ints from input + * input begins with number of inputs + * Then the list + * Then two more numbers, upper and lower bounds of a range + * incluseive of bounds + * Output all ints within the range + * follow each output with a comma + * end with newline + * example: + * Input: + * 5 25 51 0 200 33 + * 0 50 + * Output: 25,0,33, + */ + + vector intList; + int vectorSize; + int unsigned i; + int max; + int min; + + //get list size + cin >> vectorSize; + + intList.resize(vectorSize); + + // Get list + for (i=0; i < intList.size(); i++){ + cin >> intList.at(i); + } + + // get max and min + cin >> min; + cin >> max; + + for (i=0; i= min && + intList.at(i) <= max){ + cout << intList.at(i) << ","; + } + } + cout << endl; + + + + return 0; +} diff --git a/cpp/6.27-soccer-team-roster/a.out b/cpp/6.27-soccer-team-roster/a.out new file mode 100755 index 0000000000000000000000000000000000000000..5eb958d42de8e6bb154959336777095c27b04f57 GIT binary patch literal 36576 zcmeHweRNaTmGAWjV2EQYgru~kK}~@`0*-75F_1JeSVRssacrEDgydSb1XgNGLYDX% z=yM8At15I@ZQ5ZvOv{?`W|&N-^>mUBFCWBwEMVoa8n?}KJZ;*lEorY?PwF-_W%@|{ zetVyNq$^p1PS#uV&+`R&-?P8YKKtym&$%Dc`5&IfwZ%n6hCYgoj~Y}Oyw1%i_17?* zpW>q6YK?0Qw=vha$(RaEDL!td5L9Oxb`>jvhGo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zA#RRX#G*7a-nBe3C7 zaavx#S2-;5nonuV#Gl6h5(J7pUB7<+GNtPm|IzrNL(6Hq-Ug1^ujTc7nqww$r^8qk z@K?)gcnLVWeENOPb|rF5f%IQ3ry+e$+Ago3-yaisZKqbC<#c%(gbAnZ*YAg(6M1(| z{J6ECz;dbIm4nyv4LNwSl@2@1se09l b+|_>QdNq!Qc|Q56Pbv=D?bd$e6pjB2+&Q1* literal 0 HcmV?d00001 diff --git a/cpp/6.27-soccer-team-roster/main.cpp b/cpp/6.27-soccer-team-roster/main.cpp new file mode 100644 index 0000000..c677bb8 --- /dev/null +++ b/cpp/6.27-soccer-team-roster/main.cpp @@ -0,0 +1,209 @@ +/* +This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balanced team. + +(1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers in one int vector and the ratings in another int vector. Output these vectors (i.e., output the roster). (3 pts) + +Ex: + +Enter player 1's jersey number: +84 +Enter player 1's rating: +7 + +Enter player 2's jersey number: +23 +Enter player 2's rating: +4 + +Enter player 3's jersey number: +4 +Enter player 3's rating: +5 + +Enter player 4's jersey number: +30 +Enter player 4's rating: +2 + +Enter player 5's jersey number: +66 +Enter player 5's rating: +9 + +ROSTER +Player 1 -- Jersey number: 84, Rating: 7 +Player 2 -- Jersey number: 23, Rating: 4 +... + +(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (2 pts) + +Ex: + +MENU +a - Add player +d - Remove player +u - Update player rating +r - Output players above a rating +o - Output roster +q - Quit + +Choose an option: + +(3) Implement the "Output roster" menu option. (1 pt) + +Ex: + +ROSTER +Player 1 -- Jersey number: 84, Rating: 7 +Player 2 -- Jersey number: 23, Rating: 4 +... + +(4) Implement the "Add player" menu option. Prompt the user for a new player's jersey number and rating. Append the values to the two vectors. (1 pt) + +Ex: + +Enter a new player's jersey number: +49 +Enter the player's rating: +8 + +(5) Implement the "Delete player" menu option. Prompt the user for a player's jersey number. Remove the player from the roster (delete the jersey number and rating). (2 pts) + +Ex: + +Enter a jersey number: +4 + +(6) Implement the "Update player rating" menu option. Prompt the user for a player's jersey number. Prompt again for a new rating for the player, and then change that player's rating. (1 pt) + +Ex: + +Enter a jersey number: +23 +Enter a new rating for player: +6 + +(7) Implement the "Output players above a rating" menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value. (2 pts) + +Ex: + +Enter a rating: +5 + +ABOVE 5 +Player 1 -- Jersey number: 84, Rating: 7 +... +*/ + +#include +#include // FIXME include vector library +using namespace std; + +int main() { + + /* Type your code here. */ + + vector jerseyNumber(5); + vector playerRating(5); + int unsigned i; + + for (i=0; i < jerseyNumber.size(); i++){ + cout << "Enter player " << (i + 1) << "'s jersey number:\n"; + cin >> jerseyNumber.at(i); + cout << "Enter player " << (i + 1) << "'s rating:\n"; + cin >> playerRating.at(i); + cout << endl; + } + + cout << "ROSTER\n"; + for (i=0; i < jerseyNumber.size(); i++){ + cout << "Player " << (i + 1) << + " -- Jersey number: " << jerseyNumber.at(i) << + ", Rating: " << playerRating.at(i) << endl; + } + cout << endl; + + + char userInput = 0; + int tempJersey; + int tempRating; + + while (userInput != 'q'){ + userInput = 0; + cout << "MENU\n"; + cout << "a - Add player\n"; + cout << "d - Remove player\n"; + cout << "u - Update player rating\n"; + cout << "r - Output players above a rating\n"; + cout << "o - Output roster\n"; + cout << "q - Quit\n\n"; + + cout << "Choose an option:\n"; + + cin >> userInput; + + if (userInput == 'a') { + cout << "Enter a new player's jersey number:\n"; + cin >> tempJersey; + jerseyNumber.push_back(tempJersey); + cout << "Enter the player's rating:\n\n"; + cin >> tempRating; + playerRating.push_back(tempRating); + } + //REMOVE + if (userInput == 'd'){ + cout << "Enter a jersey number:\n"; + cin >> tempJersey; + for (i=0; i> tempJersey; + cout << "Enter a new rating for player:\n"; + cin >> tempRating; + + for (i=0; i> tempRating; + cout << "\nABOVE " << tempRating << endl; + + for (i=0; i < jerseyNumber.size(); i++){ + if (playerRating.at(i) > tempRating){ + cout << "Player " << (i+1) << + " -- Jersey number: " << jerseyNumber.at(i) << + ", Rating: " << playerRating.at(i) << endl; + } + } + cout << endl; + } + + if (userInput == 'o'){ + cout << "ROSTER\n"; + for (i=0; i < jerseyNumber.size(); i++){ + cout << "Player " << (i + 1) << + " -- Jersey number: " << jerseyNumber.at(i) << + ", Rating: " << playerRating.at(i) << endl; + } + cout << endl; + } + if (userInput == 'q'){ + break; + } + } + return 0; +} diff --git a/Project/DiceCup.java b/java/Project/DiceCup.java similarity index 100% rename from Project/DiceCup.java rename to java/Project/DiceCup.java diff --git a/Project/EightDie.java b/java/Project/EightDie.java similarity index 100% rename from Project/EightDie.java rename to java/Project/EightDie.java diff --git a/Project/GameManager.java b/java/Project/GameManager.java similarity index 100% rename from Project/GameManager.java rename to java/Project/GameManager.java diff --git a/Project/MyDiceGameTest.java b/java/Project/MyDiceGameTest.java similarity index 100% rename from Project/MyDiceGameTest.java rename to java/Project/MyDiceGameTest.java diff --git a/Project/MyDie.java b/java/Project/MyDie.java similarity index 100% rename from Project/MyDie.java rename to java/Project/MyDie.java diff --git a/Project/SixDie.java b/java/Project/SixDie.java similarity index 100% rename from Project/SixDie.java rename to java/Project/SixDie.java diff --git a/Project/notes/CIS 217 Project 1 Winter 2021(4).docx b/java/Project/notes/CIS 217 Project 1 Winter 2021(4).docx similarity index 100% rename from Project/notes/CIS 217 Project 1 Winter 2021(4).docx rename to java/Project/notes/CIS 217 Project 1 Winter 2021(4).docx diff --git a/Project/notes/CIS 217 Project 1 Winter 2021(5).docx b/java/Project/notes/CIS 217 Project 1 Winter 2021(5).docx similarity index 100% rename from Project/notes/CIS 217 Project 1 Winter 2021(5).docx rename to java/Project/notes/CIS 217 Project 1 Winter 2021(5).docx diff --git a/Project/notes/notes.java b/java/Project/notes/notes.java similarity index 100% rename from Project/notes/notes.java rename to java/Project/notes/notes.java diff --git a/Project/notes/temp-notes.java b/java/Project/notes/temp-notes.java similarity index 100% rename from Project/notes/temp-notes.java rename to java/Project/notes/temp-notes.java diff --git a/Project/old-my-dice-game-test.java.old b/java/Project/old-my-dice-game-test.java.old similarity index 100% rename from Project/old-my-dice-game-test.java.old rename to java/Project/old-my-dice-game-test.java.old diff --git a/in-class-10-FEB-2021/SmartWatch.java b/java/in-class-10-FEB-2021/SmartWatch.java similarity index 100% rename from in-class-10-FEB-2021/SmartWatch.java rename to java/in-class-10-FEB-2021/SmartWatch.java diff --git a/in-class-10-FEB-2021/Watch.java b/java/in-class-10-FEB-2021/Watch.java similarity index 100% rename from in-class-10-FEB-2021/Watch.java rename to java/in-class-10-FEB-2021/Watch.java diff --git a/in-class-10-FEB-2021/WatchManager.java b/java/in-class-10-FEB-2021/WatchManager.java similarity index 100% rename from in-class-10-FEB-2021/WatchManager.java rename to java/in-class-10-FEB-2021/WatchManager.java diff --git a/old/IN-CLASS-FEB-3-2021/Review.java b/java/old/IN-CLASS-FEB-3-2021/Review.java similarity index 100% rename from old/IN-CLASS-FEB-3-2021/Review.java rename to java/old/IN-CLASS-FEB-3-2021/Review.java diff --git a/old/IN-CLASS-FEB-3-2021/ReviewSystem.java b/java/old/IN-CLASS-FEB-3-2021/ReviewSystem.java similarity index 100% rename from old/IN-CLASS-FEB-3-2021/ReviewSystem.java rename to java/old/IN-CLASS-FEB-3-2021/ReviewSystem.java diff --git a/old/IN-CLASS-FEB-3-2021/Reviews.java b/java/old/IN-CLASS-FEB-3-2021/Reviews.java similarity index 100% rename from old/IN-CLASS-FEB-3-2021/Reviews.java rename to java/old/IN-CLASS-FEB-3-2021/Reviews.java diff --git a/old/StudentClass/MyStudentTest.java b/java/old/StudentClass/MyStudentTest.java similarity index 100% rename from old/StudentClass/MyStudentTest.java rename to java/old/StudentClass/MyStudentTest.java diff --git a/old/StudentClass/Student.java b/java/old/StudentClass/Student.java similarity index 100% rename from old/StudentClass/Student.java rename to java/old/StudentClass/Student.java diff --git a/old/arraylists-only-negative-numbers/arrayListFun.java b/java/old/arraylists-only-negative-numbers/arrayListFun.java similarity index 100% rename from old/arraylists-only-negative-numbers/arrayListFun.java rename to java/old/arraylists-only-negative-numbers/arrayListFun.java diff --git a/old/calculator/Calculator.java b/java/old/calculator/Calculator.java similarity index 100% rename from old/calculator/Calculator.java rename to java/old/calculator/Calculator.java diff --git a/old/calculator/MyCalculatorTest.java b/java/old/calculator/MyCalculatorTest.java similarity index 100% rename from old/calculator/MyCalculatorTest.java rename to java/old/calculator/MyCalculatorTest.java diff --git a/old/calculator/testCalculator.java b/java/old/calculator/testCalculator.java similarity index 100% rename from old/calculator/testCalculator.java rename to java/old/calculator/testCalculator.java diff --git a/old/exact-change/moneyChange.java b/java/old/exact-change/moneyChange.java similarity index 100% rename from old/exact-change/moneyChange.java rename to java/old/exact-change/moneyChange.java diff --git a/old/java1/Week-11-final-start/part-1/ItemToPurchase.java b/java/old/java1/Week-11-final-start/part-1/ItemToPurchase.java similarity index 100% rename from old/java1/Week-11-final-start/part-1/ItemToPurchase.java rename to java/old/java1/Week-11-final-start/part-1/ItemToPurchase.java diff --git a/old/java1/Week-11-final-start/part-1/ShoppingCartPrinter.java b/java/old/java1/Week-11-final-start/part-1/ShoppingCartPrinter.java similarity index 100% rename from old/java1/Week-11-final-start/part-1/ShoppingCartPrinter.java rename to java/old/java1/Week-11-final-start/part-1/ShoppingCartPrinter.java diff --git a/old/java1/Week-11-final-start/part-2/ItemToPurchase.java b/java/old/java1/Week-11-final-start/part-2/ItemToPurchase.java similarity index 100% rename from old/java1/Week-11-final-start/part-2/ItemToPurchase.java rename to java/old/java1/Week-11-final-start/part-2/ItemToPurchase.java diff --git a/old/java1/Week-11-final-start/part-2/ShoppingCart.java b/java/old/java1/Week-11-final-start/part-2/ShoppingCart.java similarity index 100% rename from old/java1/Week-11-final-start/part-2/ShoppingCart.java rename to java/old/java1/Week-11-final-start/part-2/ShoppingCart.java diff --git a/old/java1/Week-11-final-start/part-2/ShoppingCartManager.java b/java/old/java1/Week-11-final-start/part-2/ShoppingCartManager.java similarity index 100% rename from old/java1/Week-11-final-start/part-2/ShoppingCartManager.java rename to java/old/java1/Week-11-final-start/part-2/ShoppingCartManager.java diff --git a/old/java1/brute-force/main.java b/java/old/java1/brute-force/main.java similarity index 100% rename from old/java1/brute-force/main.java rename to java/old/java1/brute-force/main.java diff --git a/old/java1/brute-force/test.java b/java/old/java1/brute-force/test.java similarity index 100% rename from old/java1/brute-force/test.java rename to java/old/java1/brute-force/test.java diff --git a/old/java1/contians-character/LabProgram.java b/java/old/java1/contians-character/LabProgram.java similarity index 100% rename from old/java1/contians-character/LabProgram.java rename to java/old/java1/contians-character/LabProgram.java diff --git a/old/java1/contians-character/confused.java b/java/old/java1/contians-character/confused.java similarity index 100% rename from old/java1/contians-character/confused.java rename to java/old/java1/contians-character/confused.java diff --git a/old/java1/elements-in-range/LabProgram.java b/java/old/java1/elements-in-range/LabProgram.java similarity index 100% rename from old/java1/elements-in-range/LabProgram.java rename to java/old/java1/elements-in-range/LabProgram.java diff --git a/old/java1/exam/another_wut.java b/java/old/java1/exam/another_wut.java similarity index 100% rename from old/java1/exam/another_wut.java rename to java/old/java1/exam/another_wut.java diff --git a/old/java1/exam/wut.java b/java/old/java1/exam/wut.java similarity index 100% rename from old/java1/exam/wut.java rename to java/old/java1/exam/wut.java diff --git a/old/java1/lab-10/10.13.1-Nutritional-Information/FoodItem.java b/java/old/java1/lab-10/10.13.1-Nutritional-Information/FoodItem.java similarity index 100% rename from old/java1/lab-10/10.13.1-Nutritional-Information/FoodItem.java rename to java/old/java1/lab-10/10.13.1-Nutritional-Information/FoodItem.java diff --git a/old/java1/lab-10/10.13.1-Nutritional-Information/NutritionalInfo.java b/java/old/java1/lab-10/10.13.1-Nutritional-Information/NutritionalInfo.java similarity index 100% rename from old/java1/lab-10/10.13.1-Nutritional-Information/NutritionalInfo.java rename to java/old/java1/lab-10/10.13.1-Nutritional-Information/NutritionalInfo.java diff --git a/old/java1/lab-12/12.6-eception/NameAgeChecker.java b/java/old/java1/lab-12/12.6-eception/NameAgeChecker.java similarity index 100% rename from old/java1/lab-12/12.6-eception/NameAgeChecker.java rename to java/old/java1/lab-12/12.6-eception/NameAgeChecker.java diff --git a/old/java1/lab-8/8.33.1-turn-exp/LabProgram.java b/java/old/java1/lab-8/8.33.1-turn-exp/LabProgram.java similarity index 100% rename from old/java1/lab-8/8.33.1-turn-exp/LabProgram.java rename to java/old/java1/lab-8/8.33.1-turn-exp/LabProgram.java diff --git a/old/java1/lab-8/8.37-even-odd-in-array/LabProgram.java b/java/old/java1/lab-8/8.37-even-odd-in-array/LabProgram.java similarity index 100% rename from old/java1/lab-8/8.37-even-odd-in-array/LabProgram.java rename to java/old/java1/lab-8/8.37-even-odd-in-array/LabProgram.java diff --git a/old/java1/lab-8/8.39.1-sort-an-array/LabProgram.java b/java/old/java1/lab-8/8.39.1-sort-an-array/LabProgram.java similarity index 100% rename from old/java1/lab-8/8.39.1-sort-an-array/LabProgram.java rename to java/old/java1/lab-8/8.39.1-sort-an-array/LabProgram.java diff --git a/old/java1/lab-8/8.42.1-WordFrequencies/LabProgram.java b/java/old/java1/lab-8/8.42.1-WordFrequencies/LabProgram.java similarity index 100% rename from old/java1/lab-8/8.42.1-WordFrequencies/LabProgram.java rename to java/old/java1/lab-8/8.42.1-WordFrequencies/LabProgram.java diff --git a/old/java1/lab-9/fallingCarValue/Car.java b/java/old/java1/lab-9/fallingCarValue/Car.java similarity index 100% rename from old/java1/lab-9/fallingCarValue/Car.java rename to java/old/java1/lab-9/fallingCarValue/Car.java diff --git a/old/java1/lab-9/fallingCarValue/CarValue.java b/java/old/java1/lab-9/fallingCarValue/CarValue.java similarity index 100% rename from old/java1/lab-9/fallingCarValue/CarValue.java rename to java/old/java1/lab-9/fallingCarValue/CarValue.java diff --git a/old/java1/lab-9/stupid-teams/Team.java b/java/old/java1/lab-9/stupid-teams/Team.java similarity index 100% rename from old/java1/lab-9/stupid-teams/Team.java rename to java/old/java1/lab-9/stupid-teams/Team.java diff --git a/old/java1/lab-9/stupid-teams/WinningTeam.java b/java/old/java1/lab-9/stupid-teams/WinningTeam.java similarity index 100% rename from old/java1/lab-9/stupid-teams/WinningTeam.java rename to java/old/java1/lab-9/stupid-teams/WinningTeam.java diff --git a/old/java1/lab-9/triangle-area/Triangle.java b/java/old/java1/lab-9/triangle-area/Triangle.java similarity index 100% rename from old/java1/lab-9/triangle-area/Triangle.java rename to java/old/java1/lab-9/triangle-area/Triangle.java diff --git a/old/java1/lab-9/triangle-area/TriangleArea.java b/java/old/java1/lab-9/triangle-area/TriangleArea.java similarity index 100% rename from old/java1/lab-9/triangle-area/TriangleArea.java rename to java/old/java1/lab-9/triangle-area/TriangleArea.java diff --git a/old/java1/output-numbers-in-reverse/main.java b/java/old/java1/output-numbers-in-reverse/main.java similarity index 100% rename from old/java1/output-numbers-in-reverse/main.java rename to java/old/java1/output-numbers-in-reverse/main.java diff --git a/old/java1/word-frequencies/LabProgram.java b/java/old/java1/word-frequencies/LabProgram.java similarity index 100% rename from old/java1/word-frequencies/LabProgram.java rename to java/old/java1/word-frequencies/LabProgram.java diff --git a/old/lab_txt_msg_expander/txt_msg_expander.java b/java/old/lab_txt_msg_expander/txt_msg_expander.java similarity index 100% rename from old/lab_txt_msg_expander/txt_msg_expander.java rename to java/old/lab_txt_msg_expander/txt_msg_expander.java diff --git a/old/mortgage-pre-approved-list/CreditUnion.java b/java/old/mortgage-pre-approved-list/CreditUnion.java similarity index 100% rename from old/mortgage-pre-approved-list/CreditUnion.java rename to java/old/mortgage-pre-approved-list/CreditUnion.java diff --git a/old/mortgage-pre-approved-list/HomeBuyer.java b/java/old/mortgage-pre-approved-list/HomeBuyer.java similarity index 100% rename from old/mortgage-pre-approved-list/HomeBuyer.java rename to java/old/mortgage-pre-approved-list/HomeBuyer.java diff --git a/old/mortgage-pre-approved-list/LabProgram.java b/java/old/mortgage-pre-approved-list/LabProgram.java similarity index 100% rename from old/mortgage-pre-approved-list/LabProgram.java rename to java/old/mortgage-pre-approved-list/LabProgram.java diff --git a/old/mortgage-pre-approved-list/MyHomeBuyerTest.java b/java/old/mortgage-pre-approved-list/MyHomeBuyerTest.java similarity index 100% rename from old/mortgage-pre-approved-list/MyHomeBuyerTest.java rename to java/old/mortgage-pre-approved-list/MyHomeBuyerTest.java diff --git a/old/mortgage-pre-approved-list/MyPreApprovedListTest.java b/java/old/mortgage-pre-approved-list/MyPreApprovedListTest.java similarity index 100% rename from old/mortgage-pre-approved-list/MyPreApprovedListTest.java rename to java/old/mortgage-pre-approved-list/MyPreApprovedListTest.java diff --git a/old/output-below-amount/outputBelowAmount.java b/java/old/output-below-amount/outputBelowAmount.java similarity index 100% rename from old/output-below-amount/outputBelowAmount.java rename to java/old/output-below-amount/outputBelowAmount.java diff --git a/old/painting-a-wall/painting_a_wall.java b/java/old/painting-a-wall/painting_a_wall.java similarity index 100% rename from old/painting-a-wall/painting_a_wall.java rename to java/old/painting-a-wall/painting_a_wall.java diff --git a/old/palindrome/palindrome.java b/java/old/palindrome/palindrome.java similarity index 100% rename from old/palindrome/palindrome.java rename to java/old/palindrome/palindrome.java diff --git a/old/productClass/MyProductTest.java b/java/old/productClass/MyProductTest.java similarity index 100% rename from old/productClass/MyProductTest.java rename to java/old/productClass/MyProductTest.java diff --git a/old/productClass/Product.java b/java/old/productClass/Product.java similarity index 100% rename from old/productClass/Product.java rename to java/old/productClass/Product.java diff --git a/old/productClass/testProduct.java b/java/old/productClass/testProduct.java similarity index 100% rename from old/productClass/testProduct.java rename to java/old/productClass/testProduct.java diff --git a/old/word-freq/wordFreq.java b/java/old/word-freq/wordFreq.java similarity index 100% rename from old/word-freq/wordFreq.java rename to java/old/word-freq/wordFreq.java diff --git a/plant-information/Flower.java b/java/plant-information/Flower.java similarity index 100% rename from plant-information/Flower.java rename to java/plant-information/Flower.java diff --git a/plant-information/GardenManager.java b/java/plant-information/GardenManager.java similarity index 100% rename from plant-information/GardenManager.java rename to java/plant-information/GardenManager.java diff --git a/plant-information/MyGarden.java b/java/plant-information/MyGarden.java similarity index 100% rename from plant-information/MyGarden.java rename to java/plant-information/MyGarden.java diff --git a/plant-information/MyGardenJUnitTest.java b/java/plant-information/MyGardenJUnitTest.java similarity index 100% rename from plant-information/MyGardenJUnitTest.java rename to java/plant-information/MyGardenJUnitTest.java diff --git a/plant-information/Plant.java b/java/plant-information/Plant.java similarity index 100% rename from plant-information/Plant.java rename to java/plant-information/Plant.java diff --git a/runJavaTests/runJavaTests.sh b/java/runJavaTests/runJavaTests.sh similarity index 100% rename from runJavaTests/runJavaTests.sh rename to java/runJavaTests/runJavaTests.sh