From b1ae4633e483ab781bfd25d50402d75a491f77c6 Mon Sep 17 00:00:00 2001 From: Orange_Dugongo Date: Tue, 18 Oct 2016 17:10:13 +0200 Subject: [PATCH] toll --- src/Toll/Booth.class | Bin 0 -> 1472 bytes src/Toll/Booth.java | 48 +++++++++++++++++++++++++++++++++++++++++++ src/Toll/Test.class | Bin 0 -> 610 bytes src/Toll/Test.java | 26 +++++++++++++++++++++++ src/Toll/Truck.class | Bin 0 -> 386 bytes src/Toll/Truck.java | 18 ++++++++++++++++ 6 files changed, 92 insertions(+) create mode 100644 src/Toll/Booth.class create mode 100644 src/Toll/Booth.java create mode 100644 src/Toll/Test.class create mode 100644 src/Toll/Test.java create mode 100644 src/Toll/Truck.class create mode 100644 src/Toll/Truck.java diff --git a/src/Toll/Booth.class b/src/Toll/Booth.class new file mode 100644 index 0000000000000000000000000000000000000000..175847485351c42351c69ad0923aab195e1ee46f GIT binary patch literal 1472 zcmaJ=X;af+5PsesB#lv^ltZi zE$KqBC;@ue@yn&a_Z5u7QmN4_znLB-zE<%z>b~=_)6DSRhFf;MdN{`nw;X!X!9W;< zj{kV4!&nZQjj}uMNkL;a2*T>bYv-L~!orA&1IU{=DB_Ta!^mqWnz)0zCYEql!#xxC z@jzivk|uqpwl=vOHoV%}Y}4~AZiAkvVasVWymyXoja!Z|G-a81h({tGb9O80&wB5A zYt>ME%P47hV&W;DnK+IUY)%-kNa>Wt(e3t+=6EO~(j3(i&5Q#|GPjB60yByck{ZpZ z(6im}gVopMiLNMHA+zR&&!SGE6_IJ3mUyupdCMO+LU)}pL6h12OA(?MOg`lNAz5&p z^=WR~sn^|FMPa#qxc`U}fP0S=C_eYoq1T+6%NP~cT2x(#; z_M(q+h~No1r5N%Q0TYDGjkVBae?ziLMWd3azWPjiyFnQZ$Wop}AG zS=oY--P3|8`7P|t?rZB^)LZCop~oKELhrSX=qw}h+wPTbNatUX7@JxuMJ@F&MT4w9 zgb5O}K++y@AumY1lADgZddr@q*COj=`&hN3UXJxRS^96u4qt!Um+JII`P(fFa5Lb? zuXD@CSnvk-yvY42*ni8<#9JSf@&hdl+AR$2w(>UE34)#Eb_(d_33jSD9+nPeOinV2A}o}tCUrkgZ9L|1Is z=-;@RNhI+D{1iXJcy41tVl7Ucy7%12sb7D7`~>h64}9D}(_-0211*acA0Cl6p6!p)w`)BgB)n3jWNm@(oVCoWfL#rwUZ+7exW0P_lZP>x5Rkr23W_v0QWH; zU_&&X6e)z)?RSPp>4+g6ce^sf9=Ow!EcwD|aj))Jk6tX(QR+^rPLXBQyF&J?iYm$8 z{-59^`5`$CDA|p;z}FgY#alm`LVYLU9}rC)q#=Y@Bp2y#exK$2?GlYW6Z%uk^n}`Q zf%MH))ROjv&W7uxZSNA^-W0m6g@k?>Phr|7(vK&wk$zI+1hbLetZC%^i_Ar)mY7;% z>a4lSnhBU?(e=K4EO9fB7ByPjeuJBCa{Fhr-J#ts4e!v!fbQPYQ$klCSd*cN63h6^ Us&lO10;~9nh>mZuUjs{j0UcUt+yDRo literal 0 HcmV?d00001 diff --git a/src/Toll/Test.java b/src/Toll/Test.java new file mode 100644 index 0000000..77637a1 --- /dev/null +++ b/src/Toll/Test.java @@ -0,0 +1,26 @@ +public class Test{ + public static void main(String [] args){ + + Truck tr1 = new Truck(3, 10); + Truck tr2 = new Truck(4, 14); + Truck tr3 = new Truck(3, 7); + Truck tr4 = new Truck(5, 30); + + Booth bt1 = new Booth(); + Booth bt2 = new Booth(10, 40); + + bt1.display(tr1); + bt1.display(tr2); + bt1.receiptCollection(); + bt1.display(tr3); + bt1.display(tr4); + bt1.totalReceiptCollection(); + + bt2.display(tr1); + bt2.display(tr2); + bt2.display(tr3); + bt2.display(tr4); + bt2.totalReceiptCollection(); + bt2.receiptCollection(); + } +} diff --git a/src/Toll/Truck.class b/src/Toll/Truck.class new file mode 100644 index 0000000000000000000000000000000000000000..711f5e0859f42b6e128b1174c4792e2d83016e45 GIT binary patch literal 386 zcmZut%Syvg5IvJe)5O%)`UG|1uFb+ObSZ)eLO^t3sp}+OVronwP1KKaBUl6%et;h( zp4*BGkqa|(=R9Wa{rr0W0C0#c4>r0kEUfCV=3w2yhQN-Vay1o5C}=#YEWNE*9A!mT z9TV+^VSgmBPA4}?&_2%!by45PsvJgf&Q3E`)ycxa?Dgs4vT^-m<6TYaGErxlW_rW2 zPVV-{(L?0J#iox293M?M95crR9gPn1s7MEw@mM8Xg{~v)abug$FnFk%R}?av;7E9k zOS~NrH<{bP8zk7C!3cI{Fkjdb_>5f|X_3X_(sG%0f)?|_V3%3Qu!C0^&%ZKF0tNhm Qf2rnQYKznkB?eZ$0eLYsL;wH) literal 0 HcmV?d00001 diff --git a/src/Toll/Truck.java b/src/Toll/Truck.java new file mode 100644 index 0000000..d5dc1c6 --- /dev/null +++ b/src/Toll/Truck.java @@ -0,0 +1,18 @@ +public class Truck{ + + public Truck(int axles, int weight){ + this.axles=axles; + this.weight=weight; + } + + public int getAxles(){ + return axles; + } + + public int getWeight(){ + return weight; + } + + private int axles; + private int weight; +}