From 45fd3d0f659c901c8b0b2f669896575c87140f6c Mon Sep 17 00:00:00 2001 From: marcin Date: Sat, 30 Mar 2019 22:30:16 +0100 Subject: [PATCH] initial commit --- README | 5 ++ logs/log1.txt | 9 ++++ logs/log2.txt | 9 ++++ zad1_1.py | 16 +++++++ zad1_2.py | 25 ++++++++++ zad2_1.py | 56 ++++++++++++++++++++++ zad2_2 | Bin 0 -> 48944 bytes zad2_2.cpp | 97 ++++++++++++++++++++++++++++++++++++++ zad3_1 | Bin 0 -> 52552 bytes zad3_1.cpp | 66 ++++++++++++++++++++++++++ zad3_1.py | 50 ++++++++++++++++++++ zad5_1 | Bin 0 -> 67888 bytes zad5_1.cpp | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 461 insertions(+) create mode 100644 README create mode 100644 logs/log1.txt create mode 100644 logs/log2.txt create mode 100644 zad1_1.py create mode 100644 zad1_2.py create mode 100644 zad2_1.py create mode 100755 zad2_2 create mode 100644 zad2_2.cpp create mode 100755 zad3_1 create mode 100644 zad3_1.cpp create mode 100644 zad3_1.py create mode 100755 zad5_1 create mode 100644 zad5_1.cpp diff --git a/README b/README new file mode 100644 index 0000000..3c7b144 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +Miłosz Makowski + +Zadania + info milosz.faculty.wmi.amu.edu.pl + +Zaliczenie: Klokwium + projekt (2 języki) \ No newline at end of file diff --git a/logs/log1.txt b/logs/log1.txt new file mode 100644 index 0000000..877d834 --- /dev/null +++ b/logs/log1.txt @@ -0,0 +1,9 @@ +cpp1 +cpp2 +ilovecpp +linuxoverwindows +123 +456 +789 +abc +qwe diff --git a/logs/log2.txt b/logs/log2.txt new file mode 100644 index 0000000..877d834 --- /dev/null +++ b/logs/log2.txt @@ -0,0 +1,9 @@ +cpp1 +cpp2 +ilovecpp +linuxoverwindows +123 +456 +789 +abc +qwe diff --git a/zad1_1.py b/zad1_1.py new file mode 100644 index 0000000..1bc11e7 --- /dev/null +++ b/zad1_1.py @@ -0,0 +1,16 @@ +class Przedmiot(): + def __init__(self, subject): + self.name=subject + + def __str__(self): + return self.name + +subjects=[] +subjects.append(Przedmiot("Maths")) +subjects.append(Przedmiot("Physics")) +subjects.append(Przedmiot("PE")) +subjects.append(Przedmiot("Chemistry")) +subjects.append(Przedmiot("Computer Science")) + +for subject in subjects: + print(subject) \ No newline at end of file diff --git a/zad1_2.py b/zad1_2.py new file mode 100644 index 0000000..ab7eb9f --- /dev/null +++ b/zad1_2.py @@ -0,0 +1,25 @@ +class Vector2D(): + def __init__(self, xCoord, yCoord): + self.x=xCoord + self.y=yCoord + + def add(self, vec): + return Vector2D(self.x+vec.x, self.y+vec.y) + + def multiply(self, vec): + return (float(self.x*vec.x) + float(self.y*vec.y)) + + def __str__(self): + return ("[" + str(self.x) + ", " + str(self.y) + "]") + +# test data + +vec1=Vector2D(-3, 1.4) +vec2=Vector2D(2, 2.7) +vec3=vec1.add(vec2) + +vec4=vec1.multiply(vec2) + +print(vec3) +print(vec4) + diff --git a/zad2_1.py b/zad2_1.py new file mode 100644 index 0000000..64dd8ab --- /dev/null +++ b/zad2_1.py @@ -0,0 +1,56 @@ +class Produkt(): + def __init__(self, id, name, price): + self.id=id + self.name=name + self.price=price + def __str__(self): + return str(self.id) + ' Nazwa: ' + self.name + '\n' + 'Cena: ' + str(self.price) + 'PLN' + +class Koszyk(): + def __init__(self, clientName): + self.clientName=clientName + self.due=0 + self.products=[] + def dodajProdukt(self, produkt): + self.products.append(produkt) + self.due+=produkt.price + self.due=round(self.due, 2) + print('Dodano produkt do koszyka') + def lacznyKoszt(self): + return "Do zapłaty: " + str(self.due) + def __str__(self): + return ('Koszyk użytkownika ' + self.clientName + + '\nProdukty w koszyku:\n' + + '\n'.join(map(str, self.products))) + +products=[Produkt(1, 'Jabłko', 3.19), + Produkt(2, 'Pomarańcza', 2.59), + Produkt(3, 'Banan', 5.99), + Produkt(4, 'Śliwka', 4.89)] + +print("Wprowadź nazwę użytkownika: ", end='') +username=input() +koszyk=Koszyk(username) +print("Witaj " + username + "!") +print("Lista dostępnych produktów:") +for product in products: + print(product) +print("Aby dodać produkt do koszyka, wprowadź jego numer. Wpisz '0' aby zobaczyć zawartość swojego koszyka.") +while True: + while True: + choice=int(input()) + if choice > len(products) or choice < 0: + print("Nie ma produktu o takim numerze.") + continue + elif choice==0: + print(koszyk) + break + else: + koszyk.dodajProdukt(products[choice-1]) + print(koszyk.lacznyKoszt()) + print("Chcesz zakończyć zakupy i zapłacić? [Y/n]", end=' ') + wantExit=input() + if wantExit=='Y' or wantExit=='y': + print("Zapłacono " + str(koszyk.due) + '.') + print("Dziękujemy za zakupy!") + break \ No newline at end of file diff --git a/zad2_2 b/zad2_2 new file mode 100755 index 0000000000000000000000000000000000000000..231571d39068e48dedecef99ddbe470587c420f7 GIT binary patch literal 48944 zcmeHweSB2K)&I>KM1&+-)cC$wR1}R#NFXTI09n{Tz%&Vh_;Oh`8?q(YjmZWA^(7jx zZev;=+bU9Pd0HPIYHdsXwU(-_5s*-8En2J8S87o=LN$-|CADgP-!pUO-nln>1KQ`0 z-|zF`@(Jh8IcLtCIdkUBnYnj&Z}3;mNl!~N)Rkd;$)M7*GbE;*30r@~Hvr{EnQ=7! zKg~GR7=?1Cz)58gG`UQhSgHKI5S3L;1fs(N2WJ*B#=Ir9J9 zJ)?%(^RkQEUufLux}Yhtd}_%BP4(wDMWXE;=XaD%J%4IRL0hb#SoE9Z6Yt!Gi-_GI z^Rg)feLUlce*cdinQ-)7fzQ7{~{!%!vDcT&KEu8WI)+7RAU<4;35AL5BaZp;K#y{ zsr0-8j*tpp>A|1tp?{f&o{xISf89e4je075c6s#c*B<=Wd9?c*kAB_ap}*M@LanQL*F#QzW{gvbMymEj8 z47Q=+g_}V|+4tqadNbJ66bs35cMTR-@OHhChT&4n11y6${noRx++f05JOI3$gISqy|g79ZI0C= zra>Of*9Pk@LU($kIn1Fg4IzlCDD#QB!FaeM0+Z4FkH$<)g@?$Etletetv+kb(ZqY6Ouj))H+C?+5d7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iY{8Q!8s7$hy{>yHZlmORv&mW(v$Z#yT zU+BWC`s(wCicGrFr9+pC3wkHFzY(8Dri<1gS}Rn)Rlkk`PU((Y>&owzx7XwIJo=^D WRk&ktldAshG%;`;=c?c;8vhr*dA&9O literal 0 HcmV?d00001 diff --git a/zad2_2.cpp b/zad2_2.cpp new file mode 100644 index 0000000..970dd37 --- /dev/null +++ b/zad2_2.cpp @@ -0,0 +1,97 @@ +#include +#include +#include +#include + +using namespace std; + +class Produkt{ + public: + float price; + Produkt(int iId, string iName, float iPrice){ + id=iId; + name=iName; + price=iPrice; + } + string description(){ + stringstream s; + s << id << " Nazwa: " << name << "\n" << "Cena: " + << price << "PLN" << endl; + return s.str(); + } + private: + int id; + string name; +}; + +class Koszyk{ + public: + float due; + Koszyk(string iClientName){ + clientName=iClientName; + due=0; + } + void dodajProdukt(Produkt produkt){ + products.push_back(produkt); + due+=produkt.price; + cout << "Dodano produkt do koszyka" << endl; + } + string lacznyKoszt(){ + stringstream s; + s << "Do zapłaty: " << due << "PLN.\n"; + return s.str(); + } + string description(){ + stringstream s; + s << "Koszyk użytkownika " << clientName << "\nProdukty w koszyku\n"; + for(Produkt x : products) + s << x.description(); + s << endl; + return s.str(); + } + private: + string clientName; + vector products; + +}; + +int main(){ + vector products; + products.push_back(new Produkt(1, "Jabłko", 3.19)); + products.push_back(new Produkt(2, "Pomarańcza", 2.59)); + products.push_back(new Produkt(3, "Banan", 5.99)); + products.push_back(new Produkt(4, "Śliwka", 4.89)); + + cout << "Wprowadź nazwę użytkownika: " << endl; + string username; + cin >> username; + Koszyk* koszyk = new Koszyk(username); + cout << "Witaj " << username << "!\n" + << "Lista dostępnych produktów:\n"; + for(Produkt *p : products) + cout << p->description(); + cout << "Aby dodać produkt do koszyka, wprowadź jego numer. Wpisz '0' aby zobaczyć zawartość swojego koszyka.\n"; + while(true){ + while(true){ + string choice; + cin >> choice; + int choiceNumber=stoi(choice, nullptr, 10); + if(choiceNumber > products.size()){ + cout << "Nie ma produktu o takim numerze.\n"; + continue; + } else if(choiceNumber==0){ + cout << koszyk->description(); + break; + } else + koszyk->dodajProdukt(*products[choiceNumber-1]); + } + cout << koszyk->lacznyKoszt() << "\nChcesz zakończyć zakupy i zapłacić? [Y/n]\n"; + string wantExit; + cin >> wantExit; + if(wantExit[0]=='Y' || wantExit[0]=='y'){ + cout << "Zapłacono " << koszyk->due << ".\nDziękujemy za zakupy!"; + break; + } + } +} + diff --git a/zad3_1 b/zad3_1 new file mode 100755 index 0000000000000000000000000000000000000000..078107ee1f7261325e8255274cfdd98d8a758cc8 GIT binary patch literal 52552 zcmeHw4}4U`wg1gO35p?DXyc#iifBxYW)+f+D*Yqt}b%8fGP z2>d<4INmr6>1=_M^l}M6l~+S%GR$Rs79f?|#&jnm zhi*Oe2bV|uwctZvlW7I@a-zO!&hLPpqa|KJy&UQ0K%=A|xGEXuawDb+p+I9fNgY(K zr%C4TS(gm+Szih&eG)tRzmw@sI8U-M6r{X#RlgOhr~3rA%LyAfqk^j3`6x$n9_+=< zGnR0DZhFZl!@#8=^&4H&8^bGRmQHW1Kcg|++}3_Zd)dr0W|kJVMhc5XyNN&LJ$KPk z%5D%FR)wHXWE{~0e?Dpb%}afC#Sgvy+!A9#&CD6g@1nd@@Sk|dcIAtE!qGKp%ecAn zF7;m%430`c+6{)O@N1yR$tm(rbm6lO4NAr5RTuu7UHJUY1^+9^!b2xXs(*o;sp=&y zr@}w!BG20{@`qjU<6Pv-bK!rXi=2MsPt~sVE_}wg$P;nFpXq{ccai@(7dbz6k*CB3 z|C)>bPXOM7|IVx2rQRhja^C2YpT?QT$sFk`T;x28qJ# zE;(;eO>CBF2HV@cUT?9?g-qe*Rh2cRX3Y$<)@%BFhPk|U*&=U|$QW1=UhVZ#p~gUK zs~KC{5;DWhD4F%p!Tb|}~C0k`fSNf(P%)t|et-PZ?YCo_VL zk=78~%E6fy*U-EMsuf)n4GDcnMIThHrID6Uvu~ua5v=i=(lUHBy39)0?P3&aiqvDM z$^i+2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ER5z6VFwSMk3X|5dwHyT$@%$&Pz +#include +#include +#include +using namespace std; + +class Logger{ + public: + virtual void log(string textToLog)=0; + virtual void del(){}; + + vector history; + + protected: + virtual void history_add(string textToLog){ + history.push_back(textToLog); + } +}; + +class FileLogger : public Logger{ + public: + FileLogger(string filePath){ + logFile.open(filePath); + } + void log(string textToLog){ + history_add(textToLog); + logFile << textToLog << "\n"; + } + void del(){ + logFile.close(); + } + private: + ofstream logFile; +}; + +class StdoutLogger : public Logger{ + public: + void log(string textToLog){ + history_add(textToLog); + cout << textToLog << "\n"; + } +}; + +void saveLogs(vector &logs, string text){ + for(Logger* l : logs) + l->log(text); +} + +void stopLogging(vector &logs){ + for(Logger* l : logs) + l->del(); +} + +int main(void){ + vector logs={new FileLogger("/home/marcin/Documents/Coding/POB_2019/logs/log1.txt"), + new FileLogger("/home/marcin/Documents/Coding/POB_2019/logs/log2.txt"), + new StdoutLogger()}; + vector texts={"cpp1", "cpp2", "ilovecpp", "linuxoverwindows"}; + for(string text : texts) + saveLogs(logs, text); + stopLogging(logs); + +} + + + diff --git a/zad3_1.py b/zad3_1.py new file mode 100644 index 0000000..2923f1a --- /dev/null +++ b/zad3_1.py @@ -0,0 +1,50 @@ +import os + +class Logger(): + def __init__(self): + self.history=[] + def history_add(self, textToLog): + self.history.append(textToLog) + def log(self, textToLog): + self.history_add(textToLog) + def __del__(self): + pass + +class FileLogger(Logger): + def __init__(self, filePath): + self.history=[] + self.logFile=open(filePath, "a+") + def log(self, textToLog): + self.history_add(textToLog) + self.logFile.write(textToLog + "\n") + def __del__(self): + self.logFile.close() + +class StdoutLogger(Logger): + def log(self, textToLog): + self.history_add(textToLog) + print(textToLog) + + +def saveLogs(loggers, text): + for log in loggers: + log.log(text) + +def stopLogging(loggers): + for log in loggers: + del log + + +dir=os.path.join(os.path.dirname(__file__), "logs") + +loggers=[StdoutLogger(), + FileLogger(os.path.join(dir, "log1.txt")), + FileLogger(os.path.join(dir, "log2.txt"))] + +texts=["123", "456", "789", + "abc", "qwe"] + +for line in texts: + saveLogs(loggers, line) + +stopLogging(loggers) \ No newline at end of file diff --git a/zad5_1 b/zad5_1 new file mode 100755 index 0000000000000000000000000000000000000000..34225a564a7524b135011bde18026a3feb03aaf2 GIT binary patch literal 67888 zcmeIb4|G+w zetHpxLA9}dNdI(wu{K&cHSdeH)tA>s>swY_z9N6>uYaX|NN^5jSq?UeEg?6WWO@RXTs4ncJs(W`N{k5 zzX5%Q2k8(h^umA52R{-09`8|4n-71T4}JqWfp5B>#6=Oxc5A2~1ZY4>BF{*LwG|A&t}U-D^pj}QNwKJx$3r(LqM0RFqL_kH*a zedHlO2)HZ3{g-_3PXX_x=ii{+(~WbD-VQL}%0NHG1wU+#Raaeh8TsB+!!&QGYp6Gy zW8tQlX&Pp6#XPe*(iFKN+8m2CRm>}_ZK#h_gez+!lIBfWTyf3(+#J)aTCpNr8C{;6 zI}M*}!_CcRY-MA_jMgt}2pZ<%^4O&5W?7{fYl;xEIf6FB_0?umq%vF^uCIzzmX^nI z^DUP8hU$n}8E%f0=a^;XkZ$q(@>qVfp;;jFitD4XqTJwefp4g74wlX-D{m+_(Uf_^ ziWO#Kq^Y@~K3p4(tu&YCfXgN2BuLyG^%hiI56se2U$9#lC#nrW?kOJKgo0U*q zy;&8GRn>ri9;1<1O;f|oW^JVYhFFamX=-X{DxF&;sCkk4>e}Ke^g6eyCfo$ggrl+M z;;LY<47kbYd$h`IXokYVb;T8CMUELPp9)2Yrcl;uh$N^JRg&&ygO%ZGGhAESP$f0w z(p;g`T>Z@`CaPKC#ovYg(;>|z$CjN%L>e84NXuJ z#@$Eb(iX~Nc~uQ9F*HBFoJK!tz_#n8S>w|URaIs)-Q^nQ!up$|P*z!_xuq^bY*oto zVfa-ynN>A6naje_TGm837FiKR#X>F1qGUq1M2xyfU0uU+_<>0ku*=kiqxHsBg@xwi z>>T5&lH%Eg=A`UA>(iv{DMsO;xo~6@PAA+dK%4?OBmO3 zZuDfzKyI-3Q&7fAYmAl8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#V_2wtpqvFW z4L|(C3ZvP2w&Ja2>9rI#{ez}ol*^qo;4`rV`?n6+1dA%FYAKnq4=z{LR>zh#nsUEL zoOgAtCvg_Ve{`&xJtk5wG1x3VwHPqkVa(0iy4kVdR2#|uh5*?U*ENF|Q|klAUW)e@ zf>hkVYYsSw4)HYy+60Dg^bhfSfnqEMIliZ2xqW=kUq6=6c8==YgCe{;>y!rJl}A&A z#ZH`&-Mq3c7On)0HAz^bK1J*CP3T4=yS^b7$;LNyFUR-u_zv&<$*ydP)>dC0tv0gh zt|r`EV`NvatVewk#+oE$Ili-j_ZB&BOwgJlwP7m2pBigpMz+|^$;Np|d=`^xc2k3R z4@7pPhF`l>Q;o9f4wY6_nf#S*h>zSy)FI!ClpVht~=%I`f{QWPv;MkT-E zQ}8Cx>9<4Gz52aI1vhee5{u+i@-y1F1s_PKs=WGLM+MdIm#X$vdDZ`QTz)oJSaX{E zpkOZ>43(!c?(%m6M=Y#1`#tFyK;k0%)Gv}%zglslmk)3`1?BJK*(I2aciqbCZdZBr zI|2&+sDK$6sB#KR@5|HMSHDlGAge>MC)j@nmsk2XmNF~DOx7P`E&Zwct@uDJs=WHW zO9c;;b7_}be@}p>m$!ZwGb#(M2xx`zQH`I%cHx6wUj2Tif<20np}YO(fv0!#v76by zv)L{Sxb>~tSMU(n=pBBly!t)P3@)$uWNo(m3jY=eB)=-JekUQ5%Xg@P3{^RW{s%rN z-y&S+4|2$$`h~{z_SNrz?){FeCtm{VuPU!#nyb9g!K@o4?6gYC52~Dk zqg>@XJGdN|SAMRlQRUSA7?dZR(qC_fr1WrkxBmqs+4_49x1VESBDT zmF??{>Hm+sJAR>r^x9E+WvG&0^^3x-l3jB0-(N^Luh@YVW2Iy0y`Em>=P~DaB`6ni H-5UQNSm>_k literal 0 HcmV?d00001 diff --git a/zad5_1.cpp b/zad5_1.cpp new file mode 100644 index 0000000..2c66fff --- /dev/null +++ b/zad5_1.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include + +using namespace std; + +class Person; +class Vehicle; + +class Entity { + private: + static int nextId; + protected: + static vector entities; + int id; + public: + Entity(){ + id=nextId++; + entities.push_back(this); + } + static Entity* getEntityById(int _id){ + for(Entity *entity : entities){ + if (entity->id==_id) + return entity; + } + cout << "Could not find any entity with id " << _id << ".\n"; + return nullptr; + } + int getId(){ + return id; + } + virtual ~Entity(){ + for(unsigned int i=0; i<=entities.size(); i++){ + if (entities[i]->id==id) + entities.erase(entities.begin()+i); + } + } +}; + +int Entity::nextId=0; +vector Entity::entities; + +class Vehicle : public Entity { + friend class Person; + private: + set idsInside; + const short unsigned int limit=5; + public: + void addPerson(Person &person); + int occupiedSpaces(){ + return idsInside.size(); + } + void whoIsInside(){ + cout << "People inside car " << id << ":\n"; + if(idsInside.size()==0) + return; + for(int pid : idsInside){ + cout << pid << endl; + } + return; + } + virtual ~Vehicle(); +}; + +class Person : public Entity { + friend class Vehicle; + private: + int vehicleId; + bool isInVehicle; + public: + Person(){ + vehicleId=-1; + isInVehicle=false; + } + void getOut(){ + if(vehicleId==-1){ + cout << "This person is not inside any vehicle.\n"; + return; + } + Vehicle* vehicle=(Vehicle*)getEntityById(vehicleId); + vehicle->idsInside.erase(vehicle->idsInside.find(id)); + vehicleId=-1; + isInVehicle=false; + } + virtual ~Person(){ + getOut(); + } +}; + +void Vehicle::addPerson(Person &person){ + if(idsInside.size()>=limit) { + cout << "This vehicle has no more room for another passenger.\n"; + return; + } else if (person.isInVehicle==true){ + cout << "The person is alredy in some other vehicle.\n"; + return; + } else { + idsInside.insert(person.getId()); + person.isInVehicle=true; + person.vehicleId=id; + } +} + +Vehicle::~Vehicle(){ + for(int id : idsInside){ + Person* personInside=(Person*)getEntityById(id); + personInside->getOut(); + } +} + +int main(){ + vector people; + for(int i=0; i<10; i++) + people.push_back(new Person); + Vehicle* car1=new Vehicle(); + for(Person *newguy : people) + car1->addPerson(*newguy); + delete people[0]; + people.erase(people.begin()); + car1->whoIsInside(); + delete car1; + Vehicle* car2=new Vehicle(); + for(Person *newguy : people) + car2->addPerson(*newguy); + car2->whoIsInside(); +} \ No newline at end of file