From 662b6683211cd10b91ce3bdd146ae0069cf622f8 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 17 Nov 2020 15:13:59 +0700 Subject: [PATCH] Read the instruction wrong for HDD, fixed --- Assignement12/bin/HistogramDataDisplay.class | Bin 1733 -> 1421 bytes Assignement12/src/HistogramDataDisplay.java | 26 +++---------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Assignement12/bin/HistogramDataDisplay.class b/Assignement12/bin/HistogramDataDisplay.class index 73a9c70f5444e10998e724ca4f5ee08ed99c49ce..017822289621064ef07c3fcf705a0407e0e5f3d9 100644 GIT binary patch delta 443 zcmY+AO-~b16o#KW({`qpDUw!U(S?DgN$Em1C=pQ0hiIkcYe1}6h=YD{E7;)Xv1KY##-j}6KF$ormipPc*tPi%MSlZ(Gcz%ZW=^o~)m8CF=? z&Fr^$cGG55fz3;W(i)S3!x-ZVUGsy9^+w<~0!1X(zf#mpGG*~PJTtn@H@pqwX6C8Q zJ9(Mcl$fz7E4sdWKfQr9uTdLtgN=Hl<}k~gBDUc-eNR}Aa>cM<^u!h%To%J;W~ukR z!w@Oq)MXbH2{-V*{wRCRMQ?S@w^#{J&3%0{ry(C{hOJ2EmpR&Edued^QEI#N}q&aP`v^XWKSIc delta 824 zcmZXR%}*0i6vcmUX4)x3LB5J&Xv7dAwgF;75YZM9P^w_n@*yC~KnnpYkai@Ig>}J> z=%y>83rI}5G_XKJl!eBPaqnN?KVj5*TN8`Y*GRMo16mI2H7_2K~l#>r3h+?J$D=;xSr?J|n7!)^+6%9vJcM{FnO8{AVp3 z9Pcs@I^24PD@T8w>2rz7XZW`$-=(H1v`2T2Kq0;4ddG=z-LGxosp`w&s=AzsjSKe; z1F=1>kNJ%7x=Z<7KKFKhUle=X+7YKZmc$8aC6>@Ar)EkC;H8B!+9;PPAEBEH`lytb zs3Jx+BZ5y0C(cpkIK~=vJmEMS)bk2IyMn#V(7=06N;w#i!N^!dQYL#d&l#2?N*Zl4 z$`~4Fq}gr8#ZaNqgk*-4o?^0yt sortedArray[i + 1]) { - int temp = sortedArray[i]; - sortedArray[i] = sortedArray[i + 1]; - sortedArray[i + 1] = temp; - isSorted = false; - } - } - } - int lastVal = -1; - for (int i : sortedArray) { - if (i == lastVal) - System.out.print("*"); - else { - System.out.format("%s%d\t*", (lastVal == -1) ? "" : "\n", i); - lastVal = i; - } - } + for (int i = 0; i < super.getContent().length; i++) + System.out.format("%s%d\t%s", (i == 0) ? "" : "\n", super.getContent()[i], + "*".repeat(super.getContent()[i])); + System.out.println(); } }