From 115f98acf5a4e69145f0273edf34101e18bf04b1 Mon Sep 17 00:00:00 2001 From: Haya Date: Wed, 3 Apr 2024 05:47:45 +0300 Subject: [PATCH 01/12] Co-authored-by: Mariam Barakat --- README.md | 55 ------------------------------------------------ bin/App.class | Bin 562 -> 0 bytes bin/amica.class | Bin 0 -> 751 bytes src/App.java | 5 ----- src/amica.class | Bin 0 -> 461 bytes src/amica.java | 19 +++++++++++++++++ 6 files changed, 19 insertions(+), 60 deletions(-) delete mode 100644 bin/App.class create mode 100644 bin/amica.class delete mode 100644 src/App.java create mode 100644 src/amica.class create mode 100644 src/amica.java diff --git a/README.md b/README.md index 44d667f..f0aef15 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,3 @@ -# Level 1.4: Attendance with Grade System (Java) - -## Table of Contents - -- [Overview](#overview) -- [Learning Objectives](#learning-objectives) -- [Setup and Tutorial](#setup-and-tutorial) -- [Project Overview](#project-overview) -- [Submission Guidelines](#submission-guidelines) - - - -## overview - -This Java program manages attendance and grades for students across multiple subjects. It calculates whether a student passes or fails based on attendance and grade criteria. Additionally, it incorporates an option for an excuse of absence, affecting the attendance record. - -## learning-objectives - -1.Object-Oriented Programming (OOP): Practice creating classes and objects to model real-world entities. - -2.Conditional Statements: Learn how to use conditional statements to make decisions based on specified criteria. - -3.User Input Handling: Utilize the Scanner class to handle user input for attendance, grades, and excuses of absence. - -4.Looping Constructs: Implement loops to allow repeated operations until a termination condition is met. - -5.Algorithmic Thinking: Develop an algorithm to calculate average attendance and determine student success or failure. - -6.Documentation and Sharing: Document code with comments and create a README.md file to provide instructions and project overview. - - -## setup-and-tutorial - -### 1. Setup - -#### 1.1 Java Development Kit (JDK) - -Make sure you have Java Development Kit (JDK) installed on your system. You can download and install JDK from the official Oracle website: [Java SE Downloads](https://www.oracle.com/java/technologies/javase-downloads.html) - -#### 1.2 Integrated Development Environment (IDE) - -Choose an Integrated Development Environment (IDE) for Java development. Some popular options include: -- [visual studio code](https://code.visualstudio.com) -- [IntelliJ IDEA](https://www.jetbrains.com/idea/) - -Download and install the IDE of your choice. - -### 2. Tutorial - -#### 2.1 Java Basics - -If you're new to Java programming, it's essential to understand the basics of the language. Key topics to cover include: -- Syntax: variables, data types, operators, etc. -- Input/output using `System.out.println` and `Scanner` class. -- Control flow statements: if-else, switch-case, loops. #### 2.2 Attendance with Grade System Algorithm diff --git a/bin/App.class b/bin/App.class deleted file mode 100644 index baa6c6726ecc7ff0468f1be52445c21d3cbd1d3d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 562 zcmZuu%T5A85UhcPg%t!r@U7q@L1X0T0W~p3pvy(^EZF)xBTeAD;k@v11}65I*hoOc(;`j(n75TRQFXb)%!2zCiRyJK8^C zQ)#y@V4S%vWg(1s0ue+7QdRA!t3kJ+yj$6@l|ZKIHl-?#ydcJm@zKM)LcHH%k#4(S&iQI(k+H>Dm-2@h}NXzbk z6XZq`+AZIZ-=~U_-AWA00?A8d+wOkh&h_k8(ZVX$O|1RNO}HPjh4VyVR2A{&eRJs+onp%v?drz4(A8=qgg=2*@d zytpJA5KzXYV(9cf#S7A*$)%bOERp~6OCn}QYBl%JVrVa_{$)IDF*M6WVPqN&6RwoV z8|Yxi!`1)v48P8e$O2r$bq2>$Z&$=pM{m@uFvKl*Ht^BLO{?t|!%pwglK#jt+zAk( zOTOrWY+8UFk%SAdRqQexd=P1(GZ7jcnqv_@H%6!lSBVI@nuM=&J`rKnUf0JxJn(S; zLN7J9gcqQPKAAYP6seVP-e5VgCG%XKPs#1}CEk+riR7A+m9}N$Xe|Cv7kMIHNjpiu z9M+*V7+sK5`Za()0TWO**@j zX_hcYRO`^q)=#uQo?`n9H{w&=Zr%Nky#?xe*+Pv_>olfjiQcK+VIK$devR-S;t}C8 J98&Bc`V09XrRo3x literal 0 HcmV?d00001 diff --git a/src/App.java b/src/App.java deleted file mode 100644 index 0a839f9..0000000 --- a/src/App.java +++ /dev/null @@ -1,5 +0,0 @@ -public class App { - public static void main(String[] args) throws Exception { - System.out.println("Hello, World!"); - } -} diff --git a/src/amica.class b/src/amica.class new file mode 100644 index 0000000000000000000000000000000000000000..6b2764e819f76096d72fd1ab9c7fda8e6492e10b GIT binary patch literal 461 zcmZuuT}uK%6g{J><8Eu3rhS_F5NJgH03(nndXNeXd+2G^K}L3GmUWH#S@lrRLqDJ& z72VmW2ppKXXXc)B?&Z$M=i57g9vTi(NOM>&GRQI%XWqTn@jW%|T#aU895ZB(rIPUp zL%P)-+Q`A?a9pgw{YM`>&SMb}OD{-N=_f`~cdjF;;z1kt7C zO$SA+agilMiHPDM_EY78|%u&T7(=eK-&>YQ5 zftg9txk0xYMMg1m@Cx=sfMJtPlQ!7K7Pd)ZsQZZ&u%E$8`4<%a=;n`rG>zWE4k3%A LyR`QRr%?X_Q6OE` literal 0 HcmV?d00001 diff --git a/src/amica.java b/src/amica.java new file mode 100644 index 0000000..1b8cf16 --- /dev/null +++ b/src/amica.java @@ -0,0 +1,19 @@ +import java.nio.channels.NonReadableChannelException; +import java.util.Scanner; +public class amica { + public static void main(String[] args) throws Exception { + Scanner ciao = new Scanner(System.in); + System.out.println("Welcome to the Attendance and Grade System!"); + //list of variables + String name; int gradeo,prog,phys,math,chems; + + + + + + + + + } +} + From 3410c9fe23bc68c1a4bcc8676e947dd778e8467c Mon Sep 17 00:00:00 2001 From: Haya Date: Wed, 3 Apr 2024 05:58:53 +0300 Subject: [PATCH 02/12] OK --- bin/amica.class | Bin 751 -> 964 bytes src/amica.java | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/amica.class b/bin/amica.class index f929490f811dc649590ad7c7df6f6a17e34e90f3..117f938ff2291e3603b668732c786fd20329e032 100644 GIT binary patch delta 333 zcmZXOyH0{Z5QV=*k>4K@6OaN)$i}DvQSpA^Qrcl*nwB@6r9f&`Yszl#x~*%rIQ$aj)co`ZLHu9VFcs<#`pmh4+$)Kz zG0A7r)iIg)>V&l^Z%)|CPbgeWhXW^$oH>N=aD@ejVWN%`L`dTyStLu+X}EqC%n`?K Wijv`kQ^d@3M$x4RA|%4AMTE z803VMwlSz|1d1~;Z~;j^pehCiRt9bcHU?n^K_Jb*AO_LLpv9mK Date: Wed, 3 Apr 2024 06:27:51 +0300 Subject: [PATCH 03/12] Co-authored-by: Mariam Barakat --- bin/amica.class | Bin 964 -> 1504 bytes src/amica.java | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/bin/amica.class b/bin/amica.class index 117f938ff2291e3603b668732c786fd20329e032..c6d89649ea712729bac2fcd6cf7c06cae359150c 100644 GIT binary patch delta 671 zcmZ9JO>YuW6o#KmVP+UwrBt+7ZDwVtHo=Xk)YcFBAzCaJ)T&)L&}l(oATXMen6M!( zx@Bctn40LmE?Bs5)s?@(U!tC|cH<;7bKi5%eeQE-4)vcA^T)4m-+_5H56rDV&mgVP z^0rsaSSAx(8|69~h3-1LUe5ItBgvVZ!3{;YQ0;bVm5!A$SWrZ=Ri{zwc~hC(D~>zop&5D_%_RXS4`ScFM3#$`^BCdvZiEXwSv^saN7 zXPn^$3Epy+zO2~e90Shto@qXFL0GUU3^^P+ZDQ*t5dN)(YDp8o+& C9fbG* delta 128 zcmaFBeT1Fs)W2Q(7#J9A8EiLlr7%r4V~&`7nYo;cp_+ji2pJeOCx@_Tgl+_~m>9T# zq!a@ikYr`x2GYU|>^V=!m1U| Date: Wed, 3 Apr 2024 21:02:37 +0300 Subject: [PATCH 04/12] done? --- bin/amica.class | Bin 1504 -> 2514 bytes src/amica.class | Bin 461 -> 1274 bytes src/amica.java | 55 +++++++++++++++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/bin/amica.class b/bin/amica.class index c6d89649ea712729bac2fcd6cf7c06cae359150c..2cd52065e30d9f965da279b2a1f68a55bc91e7b4 100644 GIT binary patch delta 1429 zcma)6O>7%g5dNOm_S$Q=u@aUhDG8f4Rh=f(6sSvV`jgseNl6-0hqll{d0D^MPV8N? z`y6TtxQ7UFs*sFCIaF2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iW~7 Date: Sun, 14 Apr 2024 11:45:56 +0300 Subject: [PATCH 05/12] done with bonus! --- .vscode/launch.json | 28 +++++++++++++ bin/Bonus.class | Bin 0 -> 3749 bytes bin/amica.class | Bin 2514 -> 3046 bytes count.py | 2 + infoFile.txt | 8 ++++ src/Bonus.java | 97 ++++++++++++++++++++++++++++++++++++++++++++ src/amica.class | Bin 1274 -> 2406 bytes src/amica.java | 33 ++++++++++++--- 8 files changed, 162 insertions(+), 6 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 bin/Bonus.class create mode 100644 count.py create mode 100644 infoFile.txt create mode 100644 src/Bonus.java diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..db78244 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Bonus", + "request": "launch", + "mainClass": "Bonus", + "projectName": "Level-1.4_6bb2f5dc" + }, + { + "type": "java", + "name": "Current File", + "request": "launch", + "mainClass": "${file}" + }, + { + "type": "java", + "name": "amica", + "request": "launch", + "mainClass": "amica", + "projectName": "Level-1.4_6bb2f5dc" + } + ] +} \ No newline at end of file diff --git a/bin/Bonus.class b/bin/Bonus.class new file mode 100644 index 0000000000000000000000000000000000000000..dc1c80f5928088bb849e62a84be3aac3eb4fba28 GIT binary patch literal 3749 zcmaJ@Yj7J^75=VlY1gvi_@%^7(q!E_iSw|Xkklb|n&3yADEL)Bk~%S=Yw60~SlSiZ zRcaS#3r&GSX`wutP@tqd!mFiC!J!E-41ZwCAAazo48NG+4>O(N7c(7(N%-zcisZzp zN8Y`A?m6e4`rCj~0|orDad0#y+N5fWHCWZ7~gm!6f`Npm(O1?q>KxS2X>W-awy5LSBg zmMfqQ`HS_?QQEX@fpu+XhDwW0cv;Jy>ro4Zk1ob##LG!rtbVI4y$&J9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M-ZAfS0-jH+GGf=L#=jGT~SSfsUmc!Cr+7b&msDt_^_PrO}_X3dJ~*98T{-!9&ejG#C<%4OaZ_Kx)AtpcmcXx(R7yzjkHGF3RQoj3#isa*}D?DhWEH4f1jwIlXsqvWu*)HgiraLvVQ>) C-U*rj delta 676 zcmWlWJ4_To9L9gcaXWi^hah;$+fyNO9%}G`f}#*1L;{Keii*kst0=gK_fQb^sEjs* zWG%2b8w(Q~g9QbJjg28OK`kkajfK%fLyRUS;-5`s=9|oXuh}n~J``As{}x^Y4NT2h zHJ+xt7AI-PLld!7Jk;9RR3EY^;6#9vbSf;z9#1yMQUjy5!c!G)HW~xMl`mgLcYq$w zxGULhs@FZ@tyJgTA@AGuIbF%<;7CVwtUD?^O`kh#>^2glG)XsOgv}mqDQ2tM-A1$A z{bo$+xXFZK#&vYD`$#)wt?}rPT^~}4z;Va12bko5Dsh+0<#c48jyheaH*jh;gW;+5y`sE2=nZBEjj}?$Ko`tY5%fJ_ zot)&KmCbYfYw(=FIVtGDlKBNYWcK36kf+gO3GdCX=qBJqqZykskjY~vl3EU}%BBDqX8pV`S*k^W8%KiR_y zd-=saezTuHVz)|-%Hn|198|f~seBHpV)?0liF!wZkya&Kpij1bmB&Rcp~UhpmnBk` zM4BhcfHZ95J%fU>CI2Ue1bHR+8@VwceIxwf3Rk7|T9jd~N$+V|xGpM|6gkR>Aivb9 xWmFgeZir(Ty{e_MPvf}L{?bTMg%+!r9Az=aO<7Heb6du^q(!6@liVXs(SPCegR1}l diff --git a/count.py b/count.py new file mode 100644 index 0000000..6ddfe34 --- /dev/null +++ b/count.py @@ -0,0 +1,2 @@ +x='Name: ' +print(len(x)) \ No newline at end of file diff --git a/infoFile.txt b/infoFile.txt new file mode 100644 index 0000000..a0382a4 --- /dev/null +++ b/infoFile.txt @@ -0,0 +1,8 @@ +Student 1: +Name: Manea Yahya +Math Attendance: 48 +Physics Attendance: 42 +Chemistry Attendance: 50 +Programming Attendance: 55 +Excuses: Had a family emergency and went to hospital +GPA: 4.12 diff --git a/src/Bonus.java b/src/Bonus.java new file mode 100644 index 0000000..f30565d --- /dev/null +++ b/src/Bonus.java @@ -0,0 +1,97 @@ +import java.io.FileReader; +import java.util.Scanner; +import java.io.BufferedReader; + +public class Bonus { + public static void main(String[] args) throws Exception { + BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\Level-1.4\\Level-1.4\\infoFile.txt")); + Scanner ciao = new Scanner(System.in); + String line, name=""; + System.out.println("Welcome to the Attendance and Grade System!\nthis is the bonus part of the task\n every detail will be taken from the txt file. \nEnjoy!") ; + System.out.print("Student's Name: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Name: ")) { + name = String.valueOf(line.substring(6).trim()); + System.out.println(name); + break; + } + } + + System.out.println("The attendance for each subject:"); + //list of variables + int prog=0, phys=0, math=0, chems=0; + double gpa = 0.0; + boolean Success = true; + + System.out.print("Math: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Math Attendance: ")) { + math = Integer.parseInt(line.substring(17).trim()); + System.out.println(math); + break; + } + } + + System.out.print("Physics: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Physics Attendance: ")) { + phys = Integer.parseInt(line.substring(20).trim()); + System.out.println(phys); + break; + } + } + System.out.print("Chemistry: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Chemistry Attendance: ")) { + chems = Integer.parseInt(line.substring(22).trim()); + System.out.println(chems); + break; + } + } + + System.out.print("Programming: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Programming Attendance: ")) { + prog = Integer.parseInt(line.substring(24).trim()); + System.out.println(prog); + break; + } + } + if (math < 44 || phys < 42 || chems < 40 || prog < 47) { + System.out.print("Enter excuse of absence: "); + String forSpace = ciao.nextLine(); + String excuse = ciao.nextLine(); + int index = excuse.indexOf("hospital"); + if (index != -1) { + math++;prog++;chems++;phys++; + if(math < 44 || phys < 42 || chems < 40 || prog < 47){ + Success = false; + } + } + else{ + Success = false; + } + } + + System.out.print("Students' GPA: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("GPA: ")) { + gpa = Double.parseDouble(line.substring(5).trim()); + System.out.println(gpa); + break; + } + } + System.out.println("Student information:\nName"+name+ + "\nMath Attendance: "+math+" days\n" + + "Physics Attendance: "+phys+" days\n" + + "Chemistry Attendance: "+chems+" days\n" + + "Programming Attendance: "+prog+" days\n" + + "Grade: "+gpa); + if(Success){ + System.out.println("Result: Congrats! you've success"); + } + else{ + System.out.println("Result: Oops. you failed"); + } + } +} diff --git a/src/amica.class b/src/amica.class index 1f8f3db8bacf21a397f4abcc00a3af5e67e06d90..caaf0ba6a80c987d1ef9c8d70625d574aaefbd35 100644 GIT binary patch literal 2406 zcmaJ@-&0dZ6#f>H+z>7ZfhcIji=qZZsMb;mY7GfUED4kdluCar$wDq9_onx5D0ypV zm_Bwooj%xywqsv-tv+B!XME~YXZqAXp#MRiJMC0^HX$0v)H~$fJ-g?eJ?A^$+2z+K z4<7@FVkdwmG;8qa@WRK?vB|gjXr5aeqjPJUA|n}mS4_*4*BF|^gG(Cx44oCFk~H(9 z=?u3l;j|!tRt>t2HnhLsC0%x zMQz;05UiO`n|ZMycvd)mgcufMk<~?4IPPlhQkl!uIZMPHb6XhajYKkCKD-RI+{pFXN|>FVrgn2ow&8K8W--Cw2P~zwQeitBXUOu5X2D`R}V#g5LX2m zircg{CI*+3#!(%|@EU`Ma>-UeN+>k?bew=evRxt!pC>*~rq2^UiBlQ|bezT+hOSz6 zbvg{*qOu_W;g~`pT+^#WGPRQtMQPfWA43f1mPI~e7la{gL*|4Ll~Pz)Ze@hQt*mjw zA;64kLHYwYiD4b*RdQNoi#$0QW$2r-q;QO~U2+VIle4Vgj^WBuR#-A(D7yPLEl^jp%gjQ1Fh6!?~i*;a1v=#@I2!+tgy>2h@`GUij#)tcm0(%UsjQ&O}hc|yL9;k)Pwc{_&gqBEp*gzq8{ z@^p;;h-IZ2t7=}1w5m-bdaoXw+Q*Htwon_zd|}tec0FuYW4m7V3RimbSYQu6dMlsF zs?WJ`e~-T#={w)mR?dffA#X?vd3yX0u?SFhp}@BlWP&Rs?4ecJ-=^U`0=gALbbXv9 zm=*Nj(?}JdmEaE1{dc0W-i{G;U>u$FuSO6FbRmUqEa3=N(1TSRMV4;QO{%AZKJ382 zXH@eqa0*{y0N>yYej>j=BaFuw#4ohtZ#akFF^oTG?|(4D7%nmo#+XhwOc0mZF}gka zaD`o>TVNb97N@g)mQM5xMRygg|01M8(-8a{-IE&meu~c#&_E{~&C=ftqo<$ zzL`GxWH2!?CYs2@NHp;e@Y%n?|3MRfoC~f=&$-_@-*=nuoc@UaQnhb?K7R$UgteF2 zJ57a#L=*$igDM*fDHsaAvze@cB*#b;M={Efcx*kja!x(B)^uEd-EZ1fje$1=+H!*& z8z$Ycz>rc&1LIK~7ozY%TLZ^L6en;pSd}JNI`E`yYl}9irw&?x*NQglP!$nDkPdKD3W_bC|)BpN|{j( zPwj(!q60&bqG$slsJMNwDA&QD8smd$)-v(`3u^uF_e;oqt0Ph(`bb diff --git a/src/amica.java b/src/amica.java index b3fa24f..228d518 100644 --- a/src/amica.java +++ b/src/amica.java @@ -1,7 +1,20 @@ +import java.io.FileReader; import java.util.Scanner; +import java.io.BufferedReader; public class amica { public static void main(String[] args) throws Exception { + /* + Scanner read = new Scanner(System.in); + try{ + FileReader R = new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\infoFile.txt"); + int x; + while((x=R.read())!=-1){ + System.out.print((char) x); + } + } + catch(Exception ex){} + */ Scanner ciao = new Scanner(System.in); System.out.println("Welcome to the Attendance and Grade System!"); System.out.print("Enter your name dear student: "); @@ -9,7 +22,7 @@ public static void main(String[] args) throws Exception { System.out.println("Enter the attendance for each subject:"); //list of variables int prog, phys, math, chems; - double gpa = 0; + double gpa = 0.0; boolean Success = true; System.out.print("Math: "); @@ -40,17 +53,25 @@ public static void main(String[] args) throws Exception { } } - System.out.print("Enter your GPA: "); - gpa = ciao.nextDouble(); + System.out.print("Students' GPA: "); + /*gpa = ciao.nextDouble(); if(gpa<=3.5){ Success = false; + }*/ + BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\infoFile.txt")); + String line; + while ((line = reader.readLine()) != null) { + if (line.startsWith("GPA: ")) { + gpa = Double.parseDouble(line.substring(5).trim()); + System.out.println(gpa); + break; + } } - System.out.println("Student information:\nName"+name+ - "Math Attendance: "+math+" days\n" + + "\nMath Attendance: "+math+" days\n" + "Physics Attendance: "+phys+" days\n" + "Chemistry Attendance: "+chems+" days\n" + - "Programming Attendance: "+prog+" days" + + "Programming Attendance: "+prog+" days\n" + "Grade: "+gpa); if(Success){ System.out.println("Result: Congrats! you've success"); From 00684611853a14073e2b0d21529ddca14cdd935e Mon Sep 17 00:00:00 2001 From: Haya Date: Sun, 14 Apr 2024 14:38:37 +0300 Subject: [PATCH 06/12] still writing part --- bin/Bonus.class | Bin 3749 -> 3857 bytes count.py | 2 +- infoFile.txt | 2 +- src/Bonus.java | 19 +++++++++++++------ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/Bonus.class b/bin/Bonus.class index dc1c80f5928088bb849e62a84be3aac3eb4fba28..cf34aa8c790d7c2c1db5009826c7434a4823bb76 100644 GIT binary patch delta 999 zcmZ{iTWl0{6vlt&Uv_79c3NajgH54Mn--yEZGy4bO=#r~r74XC47LI*-D*SKUAw!w zNb7p3hzckjyc7hyLA{_@svGrz#1~C`Ga7HvXf!eL#o(icSWjz>#OTRP=KFvDbH4MP zlR3TcNR{*PAMalPRxml?bQ&4)yUkMB;vXH+-I@kz|qPNPWy5r!E>v7ik$|LG+4Xku^m&yi0q`)vOA) z$g*+Vh9aHYJ3gBFvcioF7Rff1mY4dY;pVz~RArpnXk_n9!1P7#r&HfGUdxbo$vX2{Ogq1SNDmlh#IicJc z*2y{6%R6k457;Q*(k9>2E^7@N6igep6INS?|5_afIi#m~CZ^022n$RjPjUpq zb<{A5uLE?;#aZN;297E>hkp5ir+AtG1M(fuC<>C2Z+KRb#h`q}m?E2;e9keB6Vl)K zQwq;obK^?@m>FJraA3};`){gYWs z_+Ry+Q6f-n`@71V6_+T}>}vZGO%nJG<9PNWOUHas9T;BXW&PT^ir4ggoj3I4D0-8( HI8Vi&@0s82 delta 870 zcmYk1TWnNS6o$XGVdk7Ub2`WXy)Gl$ZMSKbs@-WCOc0HnG(Vb}#|)nLDf6)4#!+9jvk*rvRjr;aReB25 zu;|gwCZ88rD>#LCUDUUHy~}1{(u!*Dx+tzzZVw*nn%@?6k^LjpaPzA^b9qgect^+VRe3f1y3Y=F+L`GkvfIY# zCVA5iq<_u0>r3SoJ>k=lEjTk}uifLcq(9|^!)NvfXZD00oV1snW5JNi7s7#S=7K`3 zvW;Q2P>S2UW#PuiUUE0*1%GiIN96^@uu_RC4#T#Vxl=~$iOlZIR$L~5X&Ra5Jtx8H zvoz=9gx2PSo;H8{tgElfR}y;X=BDKAQvTsl`Il8P%4!3T8N=fy z!%E}xgqcjYsb`Iu##+>;wZ<+N Date: Sun, 14 Apr 2024 16:48:11 +0300 Subject: [PATCH 07/12] DONE! --- .vscode/launch.json | 7 ++++ bin/Bonus10.class | Bin 0 -> 3757 bytes infoFile.txt | 3 +- src/Bonus10.java | 79 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 bin/Bonus10.class create mode 100644 src/Bonus10.java diff --git a/.vscode/launch.json b/.vscode/launch.json index db78244..ac29121 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,13 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "type": "java", + "name": "Bonus10", + "request": "launch", + "mainClass": "Bonus10", + "projectName": "Level-1.4_6bb2f5dc" + }, { "type": "java", "name": "Bonus", diff --git a/bin/Bonus10.class b/bin/Bonus10.class new file mode 100644 index 0000000000000000000000000000000000000000..a65566535e5ef0f8f269c5a73b369f219843b756 GIT binary patch literal 3757 zcmaJ@Yj7J^75=UzYgdZw*h=KYZQ5)giJhdf6Oy=%ou>GeM6GOx*hz3}9&72!-dNfd z+LaSSpg>)orG@fJ!lR@>Q{E&6hjE6-Ob1GN4E%tBnKHvL)0zHZfZxCnzPplaxpA^1 z-M#mmv*(`2ch0@P`rqPD0NjrS4Rr!qpJSKYJ-amo1)5Hqvu0<`w5K{pCQr+>ClESl z*_L-mAke$hzYD)mRjOySWgW;!*V+N zO4+O|%FJ)` zf@eJ=tDrq3$t<|_pI`Ub z(xluyhT|IEQpKF#4wAMfr(`jTQH%-b%#$lgyM?z&9W3DW$EN38EA6h(uH&t&*#2pm zw-|!C*YO@E8jls7siK+Bvk$zEJ0VbiXD%S0hnkabo?Mzt~>Qvw^th)8)hU2>&DqdDnHB3SLa7giLf6@Kb{{OHIrpX^5z zbroz_ar(657A()qsVo+vc$W&9X4x5eb|kBVZO~Bq&E?X_Iz>a8>1l(&P;Iw6#tvPI zVpgGLL!NN&ckHz3DS&ZCwAr2;gFq>UIyD5;5X5`bC+C#E1FPga#&Un3l6X{LS1m*; zO*hGBweNI%fF>W8ZYk$=8{D7i@!T!OoKtFJ$8<~Sv~*n^k1=^wsS&5(b|?uW%gU7* z!q_ZM(e-t!bbD5s3coB;!BV$c+04~>k+w{S3d$0-olr4z%$+)WmJf-FSLE3&WA0H- zDAxrdOh6>nln~`B&mv$-(}X3LfvJK?K4Y(qmYw5@& zG(65mFzS?wX{ma@K(un!btsz%)jr4ZhzDRiw)bkFvw&q`NicI5VX}&&{Ezp{)3DY_1?z5wFeEDqW?rcb5CH+h+I$ zPhH;=cqL-+Nv!rnjERYJl_u`D@D8I?$e5nYoa^ko&1aEvix-ib+MqBp=A2tKe?=#% zu$DYojalQ=YHa@?q_+kSRMlekGcrkas`uwim#sv@Re^0c!D6*UYxse{-M1Gd`pc-m z7IuvQy9?Mj2xWvgYFu^l&BGq`JFh{%;r6&ACGOghSqD?l)8@1<5#ie8rp_pJG+DY*9W>nfi5l3r3bpgjRzvZ zu4tgE;VSNl?Owo})can(FXQP%?7#wgE}%Kl6k0&<0tSDCWOpzT8>*6tK^N#VAq{#2}$?@m~G^$PB@26&sntqT|g_r;oV*Y_1 zjvDcxV-r!bmDJtD&tBr^0Fl#6+$4#S6p?d+QfZ#TIjrZlEqDwY@F}$7BJRNR{Q3&+ z!cTcq{Ur?iktHmsrGS@i`S;aSfm6tbzXDi}RFg#0A>pq3H$Jp9N#q7Sy`2hU`+sRm{l8IH_aAr~J^cdruEQ7cCBC=Qqpva| gU-QT3{PB5z{H8yC+aJG+?^8BHxhr@9KSb;Q0qT3XO#lD@ literal 0 HcmV?d00001 diff --git a/infoFile.txt b/infoFile.txt index b8073dd..f0e7531 100644 --- a/infoFile.txt +++ b/infoFile.txt @@ -4,5 +4,6 @@ Math Attendance: 48 Physics Attendance: 42 Chemistry Attendance: 50 Programming Attendance: 45 -Excuses: Had a family emergency and went to hospital GPA: 4.12 +Excuses: Had a family emergency and went to hospital + diff --git a/src/Bonus10.java b/src/Bonus10.java new file mode 100644 index 0000000..9c0f429 --- /dev/null +++ b/src/Bonus10.java @@ -0,0 +1,79 @@ +import java.io.FileReader; +import java.util.Scanner; +import java.io.BufferedReader; + +public class Bonus10 { + public static void main(String[] args) throws Exception { + BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\Level-1.4\\Level-1.4\\infoFile.txt")); + Scanner ciao = new Scanner(System.in); + String line, name="", excuse=""; + int prog=0, phys=0, math=0, chems=0; + double gpa = 0.0; + boolean Success = true,need=false; + System.out.println("Welcome to the Attendance and Grade System!\nThis is the bonus part of the task\nEvery detail will be taken from the txt file. \nEnjoy!") ; + System.out.println("Student's info: "); + while ((line = reader.readLine()) != null) { + if (line.startsWith("Name: ")) { + name = String.valueOf(line.substring(6).trim()); + } + if (line.startsWith("Math Attendance: ")) { + math = Integer.parseInt(line.substring(17).trim()); + } + if (line.startsWith("Physics Attendance: ")) { + phys = Integer.parseInt(line.substring(20).trim()); + } + if (line.startsWith("Chemistry Attendance: ")) { + chems = Integer.parseInt(line.substring(22).trim()); + } + if (line.startsWith("Programming Attendance: ")) { + prog = Integer.parseInt(line.substring(24).trim()); + } + if (line.startsWith("GPA: ")) { + gpa = Double.parseDouble(line.substring(5).trim()); + need=true; + break; + } + } + while(need){ + line = reader.readLine(); // read a new line + if (math < 44 || phys < 42 || chems < 40 || prog < 47) { + System.out.print("The excuse of absence: "); + if (line.startsWith("Excuses: ")) { + excuse = String.valueOf(line.substring(9).trim()); + System.out.println(excuse); + } + int index = excuse.indexOf("hospital"); + if (index != -1) { + math++;prog++;chems++;phys++; + if(math < 44 || phys < 42 || chems < 40 || prog < 47){ + Success = false; + } + } + else{ + Success = false; + } + } + need=false; + } + System.out.println("The attendance for each subject:"); + System.out.println("Math: " + math); + System.out.println("Physics: " + phys); + System.out.println("Chemistry: " + chems); + System.out.println("Programming: " + prog); + System.out.println("Students' GPA: " + gpa); + System.out.println("\n ---------------------\n \\\\|Student info. updated|//\n ---------------------\n" + // + "\nName: "+name+ + "\nMath Attendance: "+math+" days\n" + + "Physics Attendance: "+phys+" days\n" + + "Chemistry Attendance: "+chems+" days\n" + + "Programming Attendance: "+prog+" days\n" + + "Grade: "+gpa+" out of 5"); + if(Success){ + System.out.println("Result: Congrats! you've success"); + } + else{ + System.out.println("Result: Oops. you failed"); + } + } +} + From fc3faeb7daed03e00e7d934224312ea6e7557720 Mon Sep 17 00:00:00 2001 From: Haya Date: Sun, 14 Apr 2024 16:50:53 +0300 Subject: [PATCH 08/12] delete RDME file --- README.md | 87 ---------------------------------------- bin/Bonus.class | Bin 3857 -> 0 bytes count.py | 5 ++- src/Bonus.java | 104 ------------------------------------------------ 4 files changed, 3 insertions(+), 193 deletions(-) delete mode 100644 README.md delete mode 100644 bin/Bonus.class delete mode 100644 src/Bonus.java diff --git a/README.md b/README.md deleted file mode 100644 index f0aef15..0000000 --- a/README.md +++ /dev/null @@ -1,87 +0,0 @@ - -#### 2.2 Attendance with Grade System Algorithm - -Before coding, plan the algorithm for managing attendance and grades: -- Prompt the user to input attendance for each subject and an excuse of absence if applicable. -- Calculate average attendance across subjects. -- Prompt the user to input grades for the semester. -- Determine whether the student passes or fails based on attendance and grade criteria. - -#### 2.3 Coding the Attendance with Grade System - -Start coding the Attendance with Grade System project: -- Create a Student class to represent student information, including attendance, grades, and methods for calculating success or failure. -- Implement the main application logic to handle user interactions, input, and output. -- Utilize conditional statements and looping constructs to manage attendance, grades, and determining student success or failure. -- Test the program with various inputs to ensure correctness and handle edge cases. - - -#### 2.4 Documentation and Sharing - -Document your code with comments to explain functionality and logic. Create a README.md file to provide project instructions and overview. Share your project with the programming club for feedback and collaboration. - - -## Project Overview: - -### Description - -This Java project focuses on creating an Attendance with Grade System program to manage student attendance and grades for multiple subjects. The program allows users to input attendance, grades, and excuses of absence, and determines whether students pass or fail based on specified criteria. - -### Requirements - -1. **Attendance Tracking:** - - Track attendance for each subject (math, physics, chemistry, programming) with specified requirements. - - Allow users to input an excuse of absence, increasing absences if the excuse contains the word "hospital". - -2. **Grade Input:** - - Prompt users to input grades for the semester (out of 5). - -3. **Success/Failure Determination:** - - Calculate attendance across subjects and determine if it meets the minimum requirement. - - Determine if the grade is above 3.5 (student success), below 3.5, or 3.5 (student failure). - -4. **User Interaction:** - - Implement a user-friendly interface to input attendance, grades, and excuses for absence. - - Provide clear output indicating whether the student passes or fails. -5. **minimum attendance day** - - math classes should be attended 44 days out of 50 - - physics classes should be attended 42 days out of 50 - - chemistry classes should be attended 40 days out of 50 - - programming classes should be attended 47 days out of 50 -6. **excuse for absence** - add to the program the option of the excuse of absence if the input contains the word hospital increases one absence from each class. - -### Example Interaction -```Welcome to the Attendance and Grade System! -Enter student name: John Doe -Enter the attendance for each subject: -Math: 43 -Physics: 41 -Chemistry: 39 -Programming: 46 -Mark attendance for each subject (Enter excuse of absence): Went to hospital for a check-up -Enter grade for the semester (out of 5): 4.2 - -Student Information: -Name: John Doe -Math Attendance: 44 days -Physics Attendance: 42 days -Chemistry Attendance: 40 days -Programming Attendance: 47 days -Grade: 4.2 - -Result: Success -``` - -### Bonus - -- Implement file I/O to read student information from a file and store results. -- Enhance the user interface with ASCII art or additional messages for better engagement. - -## Submission Guidelines - -- The app should be pushed to Github and a pull request should be created. You can check how to push your code to Github in section [2.1.2 Add Changes](https://github.com/Programming-Club-IAU/git-and-github#212-add-changes). -- The pull request title should be in the following format: ` - `. You can check how to make a pull request in section [2.1.5. Create a pull request](ttps://github.com/Programming-Club-IAU/git-and-github#215-create-a-pull-request). -- The pull request description should contain the following: - - A description of your project. - - A screenshot of the app. diff --git a/bin/Bonus.class b/bin/Bonus.class deleted file mode 100644 index cf34aa8c790d7c2c1db5009826c7434a4823bb76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3857 zcmaJ@X>c4z8GSuEX0%${I=r@IJNC$tZTXNC$F__m$3};bb#$SXWn?Q(M!PL(tlgPq zXI7DjLlPox5+Gc0AOsr{b0)-q3~?1z@P{gXQAHJ%a1<0!{GvGi0hPkMp567XY&l!I zJ3U{2SHJJ|*ZqtCz3~$O58(ScG=Yj9*U5T1$^~jJSaVi;(sHKThbAw`xGzw7*mi9H zh(KA(&M|@VUN<2_C__~k6{r+g({DR+Fq@i`nNe#pDFy2K-MEz;vof}N&kM`_8QT-k z`-5Ozbd<7eM_^scx&C6%n4hto=`Iy0bZkB@)4uIGOs!6!zNmF;M#oxu2qtW|y(c?0 zB{MQHBCUkX=vc>83UkNpq|C_;Gzi$eofD@$neirO_Agle#E>KVGWMJ_Tg~V|_kh{m z(|5Xmr2FJR_n_Gm9W;-3M`PXn=IO!c*s+mVbaZ^8PkOVyo1W;Gb28bww{3sP$abb& z6|l{p_d|$ag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*vl0LOH}YYC2FYBh#$!?7`3 zmsx_}u`04kdkK3Nb+K3>77ejjDc&JqxU8f4DhPXk_M^dCnp^7@f~Xr?x!_#!9y?UU zpbb?^c&Y^Kw^SnK5j|2FF(MTWRc~MsU|x~xOIWRz^3fp4!1u>FRAejz$taFsh+~~p zGq8ySG%0N%HSZ%e_mPx`Nxf4fWy)T~y-cDRKjx+QXV{KkVh7%&_uo?X7wpF0um}G@EB=i(QOQg0YTPGku}5s+ z1#&A6h;8T)Z8#_n^P<>?L*fKw!#FIGyb$_0BIa>aJjT1=BD%$M=n*gQ{`Vqfui&_N zjhDM0;-vT~qT=^BCH{zh@n;N*zhXrE9Wn7Q-mU(N)0&PkZ4J(7b%<#jaaP-mbDD_> zZ7UwqnsHv+j)%1tJfiL5-2Je$gP7EgBChp7YNs$AY~p8g+mq{mhFI2Wop=_X;`ZI7 zwd2$H3^(*X-sGRdXNmba@z4Co)OO=@l$G-~^e22CUtmi}ia+3s996;Bxw; zaET)WS@CP)`z2OsUi=DQ#*3&X1`fVLFJZ3uAYP*0Dtwh$Jb{fj8MZ>lWgYc8w&*y@ zFL0CXswk!ZKxUN4iki)+zRh0nQ^xkyWP}Rejc;Q$O`43iS+0uzKnt11cAZPT!Zb8| a4PWQeAROP~@7wq;-$ER{itphX8vhTDy4yAY diff --git a/count.py b/count.py index 5dfdb03..b36219b 100644 --- a/count.py +++ b/count.py @@ -1,2 +1,3 @@ -x='Excuses: ' -print(len(x)) \ No newline at end of file +x='' +print(len(x)) +#these simple lines help me knowing the beginIndex without any effort \ No newline at end of file diff --git a/src/Bonus.java b/src/Bonus.java deleted file mode 100644 index 72325af..0000000 --- a/src/Bonus.java +++ /dev/null @@ -1,104 +0,0 @@ -import java.io.FileReader; -import java.util.Scanner; -import java.io.BufferedReader; - -public class Bonus { - public static void main(String[] args) throws Exception { - BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\Level-1.4\\Level-1.4\\infoFile.txt")); - Scanner ciao = new Scanner(System.in); - String line, name=""; - System.out.println("Welcome to the Attendance and Grade System!\nThis is the bonus part of the task\nEvery detail will be taken from the txt file. \nEnjoy!") ; - System.out.print("Student's Name: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("Name: ")) { - name = String.valueOf(line.substring(6).trim()); - System.out.println(name); - break; - } - } - - System.out.println("The attendance for each subject:"); - //list of variables - int prog=0, phys=0, math=0, chems=0; - double gpa = 0.0; - boolean Success = true; - - System.out.print("Math: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("Math Attendance: ")) { - math = Integer.parseInt(line.substring(17).trim()); - System.out.println(math); - break; - } - } - - System.out.print("Physics: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("Physics Attendance: ")) { - phys = Integer.parseInt(line.substring(20).trim()); - System.out.println(phys); - break; - } - } - System.out.print("Chemistry: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("Chemistry Attendance: ")) { - chems = Integer.parseInt(line.substring(22).trim()); - System.out.println(chems); - break; - } - } - - System.out.print("Programming: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("Programming Attendance: ")) { - prog = Integer.parseInt(line.substring(24).trim()); - System.out.println(prog); - break; - } - } - if (math < 44 || phys < 42 || chems < 40 || prog < 47) { - System.out.print("Enter excuse of absence: "); - String excuse=""; - while ((line = reader.readLine()) != null) { - if (line.startsWith("Excuses: ")) { - excuse = String.valueOf(line.substring(6).trim()); - System.out.println(excuse); - break; - } - } - int index = excuse.indexOf("hospital"); - if (index != -1) { - math++;prog++;chems++;phys++; - if(math < 44 || phys < 42 || chems < 40 || prog < 47){ - Success = false; - } - } - else{ - Success = false; - } - } - - System.out.print("Students' GPA: "); - while ((line = reader.readLine()) != null) { - if (line.startsWith("GPA: ")) { - gpa = Double.parseDouble(line.substring(5).trim()); - System.out.println(gpa); - break; - } - }/////Nice!! - System.out.println(" ---------------------\n \\\\|Student info. updated|//\n ---------------------\n" + // - "\nName: "+name+ - "\nMath Attendance: "+math+" days\n" + - "Physics Attendance: "+phys+" days\n" + - "Chemistry Attendance: "+chems+" days\n" + - "Programming Attendance: "+prog+" days\n" + - "Grade: "+gpa+" out of 5"); - if(Success){ - System.out.println("Result: Congrats! you've success"); - } - else{ - System.out.println("Result: Oops. you failed"); - } - } -} From edf22cc56fb2b44849fc0d7208920ac53f100ddc Mon Sep 17 00:00:00 2001 From: Haya Date: Sun, 14 Apr 2024 17:41:49 +0300 Subject: [PATCH 09/12] still the writing part --- bin/Bonus10.class | Bin 3757 -> 3766 bytes src/Bonus10.java | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/Bonus10.class b/bin/Bonus10.class index a65566535e5ef0f8f269c5a73b369f219843b756..8c356f1b8d4903338d5254dec29cd7aa499d27a5 100644 GIT binary patch delta 482 zcmX|-%TE(w6vfZ2o#}KsmQX2RO7&at7#T`=$g3r+AjUv6q-@wghB~EF%CvOaQjkCh zCM;Qe8(rwaJ%K=&n9)7q-*D|e;3L5)Q8wq?-_6ZA$vurb@$+thzY}`=rh)=L71(1l z0v|ki&=fyP-X3K_ROL^^_JazcV<~SiqmixI1}o*5zGfR%)<`iKqo^vVAx03&71OFp z*d_$$?oRC#ldwaO@+G@$R`sHcX}ndihb2P5wB8tv*SQD;>^BP!2%5T3(Cd1#s9WpF zOx4R)VYB3`BAcMmF7m)X2)Nj|hoFn%J%}zg|3jzj!ny-KA5sHb4(vpv&UZsk{S61Z z{9|aA_bZ<=KhTSx=pzv-J;F0$=%)lU8o~gLAwi26q-7*&4MSAMFf}krhj>oM7$c5x zI>Q8AV2ZAgrZ1SGuh4kx;Z55iCh#672;&3bJ-PK33p^c;^Jut-q~_G}8}qF9kC!3* Lg3qV%T=>ObtCMl( delta 460 zcmX}mOKTHx7{%e=8#Bq|(oh41ilz=;n$+5k7os7p6{Jy++Jbe{WoVOh+A$L|GimCj zF5C)&|4l1`=)#>K24*o|K*SFrxDi480AA2kY&Qp<1269ha&K~PPiX3ecI1kcW{tyw z)@oZ#PsbJ#mF}|d*4(n8(-ibo$8A|&)lM=^E6p8l3302rQtK|%bzF5!%SZh*9d$!9 zihh;|{W!22QSSA7?h8YO*|E8`YNu-2)n>z7^!nc#Q&}{&b}u8bq8O?aGe&eC3BxyQ zu5Wu~W5H>;lg6gw8}+JX*H(I4v5M#&UJ2WUIrS+q()${J5D{H9lAn{$#sij@=HLHW zSI<+0cs*csBD=0WrjAB$2RQ0`YW8Zj9dPa)r-$?q5B?(_vayduNOvExkj*^|CqwT3 zgEG@E7r!vdH}axWkU_@e5T_*1xR^{xiAkBklgEUxPYu ABLDyZ diff --git a/src/Bonus10.java b/src/Bonus10.java index 9c0f429..afab38b 100644 --- a/src/Bonus10.java +++ b/src/Bonus10.java @@ -34,6 +34,12 @@ public static void main(String[] args) throws Exception { break; } } + System.out.println("The attendance for each subject:"); + System.out.println("Math: " + math); + System.out.println("Physics: " + phys); + System.out.println("Chemistry: " + chems); + System.out.println("Programming: " + prog); + System.out.println("Students' GPA: " + gpa); while(need){ line = reader.readLine(); // read a new line if (math < 44 || phys < 42 || chems < 40 || prog < 47) { @@ -55,13 +61,7 @@ public static void main(String[] args) throws Exception { } need=false; } - System.out.println("The attendance for each subject:"); - System.out.println("Math: " + math); - System.out.println("Physics: " + phys); - System.out.println("Chemistry: " + chems); - System.out.println("Programming: " + prog); - System.out.println("Students' GPA: " + gpa); - System.out.println("\n ---------------------\n \\\\|Student info. updated|//\n ---------------------\n" + // + System.out.println("\n ---------------------\n \\\\|Student info. updated|//\n ---------------------\n" + // "\nName: "+name+ "\nMath Attendance: "+math+" days\n" + "Physics Attendance: "+phys+" days\n" + @@ -69,10 +69,10 @@ public static void main(String[] args) throws Exception { "Programming Attendance: "+prog+" days\n" + "Grade: "+gpa+" out of 5"); if(Success){ - System.out.println("Result: Congrats! you've success"); + System.out.println("Result: Congrats! you've success >_<"); } else{ - System.out.println("Result: Oops. you failed"); + System.out.println("Result: Oops. you failed :'("); } } } From 133e744c9c2a5d9f343df972069119497ee97f07 Mon Sep 17 00:00:00 2001 From: Haya Date: Sun, 14 Apr 2024 17:49:15 +0300 Subject: [PATCH 10/12] update the txt file --- .vscode/settings.json | 4 ++++ infoFile.txt | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index e112a70..83fb502 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,9 @@ "java.project.outputPath": "bin", "java.project.referencedLibraries": [ "lib/**/*.jar" + ], + "cSpell.words": [ + "Manea", + "Yahya" ] } diff --git a/infoFile.txt b/infoFile.txt index f0e7531..e20ff07 100644 --- a/infoFile.txt +++ b/infoFile.txt @@ -1,3 +1,6 @@ +You can change the wanted student by putting their info above the others +or change the details fot the first student + Student 1: Name: Manea Yahya Math Attendance: 48 @@ -7,3 +10,20 @@ Programming Attendance: 45 GPA: 4.12 Excuses: Had a family emergency and went to hospital +Student 2: +Name: Sarah Johnson +Math Attendance: 60 +Physics Attendance: 60 +Chemistry Attendance: 59 +Programming Attendance: 60 +Excuses: Recovering from surgery +GPA: 4.82 + +Student 3: +Name: Michael Lee +Math Attendance: 56 +Physics Attendance: 58 +Chemistry Attendance: 54 +Programming Attendance: 59 +Excuses: Participating in a national coding competition +GPA: 4.65 \ No newline at end of file From 2031a96f70db06a8226844f3fd955fc8b808d729 Mon Sep 17 00:00:00 2001 From: Haya Date: Tue, 16 Apr 2024 09:25:21 +0300 Subject: [PATCH 11/12] done with writing --- bin/Bonus10.class | Bin 3766 -> 4253 bytes infoFile.txt | 20 +------------------- src/Bonus10.java | 32 ++++++++++++++++++++++++-------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/bin/Bonus10.class b/bin/Bonus10.class index 8c356f1b8d4903338d5254dec29cd7aa499d27a5..5f63223affe7e00be9948d38eaa19615d868292b 100644 GIT binary patch delta 2354 zcmaJ@ZEzdK8GhcCba%R(Wm(C^c8DE0aU#n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}8z@Mn}Wd6l~gg;<1<%wME^PJs;7jT5vOfKprCgo*AzG}!5hJ4+SZyNF~yv@FL M_8Y`IIE}P_0E`KmEC2ui diff --git a/infoFile.txt b/infoFile.txt index e20ff07..fa1998b 100644 --- a/infoFile.txt +++ b/infoFile.txt @@ -8,22 +8,4 @@ Physics Attendance: 42 Chemistry Attendance: 50 Programming Attendance: 45 GPA: 4.12 -Excuses: Had a family emergency and went to hospital - -Student 2: -Name: Sarah Johnson -Math Attendance: 60 -Physics Attendance: 60 -Chemistry Attendance: 59 -Programming Attendance: 60 -Excuses: Recovering from surgery -GPA: 4.82 - -Student 3: -Name: Michael Lee -Math Attendance: 56 -Physics Attendance: 58 -Chemistry Attendance: 54 -Programming Attendance: 59 -Excuses: Participating in a national coding competition -GPA: 4.65 \ No newline at end of file +Excuses: Had a family emergency and went to hospital \ No newline at end of file diff --git a/src/Bonus10.java b/src/Bonus10.java index afab38b..a415155 100644 --- a/src/Bonus10.java +++ b/src/Bonus10.java @@ -1,13 +1,15 @@ import java.io.FileReader; +import java.io.FileWriter; import java.util.Scanner; import java.io.BufferedReader; - +import java.io.IOException; public class Bonus10 { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\Level-1.4\\Level-1.4\\infoFile.txt")); + FileWriter w = new FileWriter("C:\\Users\\h4yat\\OneDrive - IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY\\Desktop\\Level-1.4\\Level-1.4\\infoFile.txt",true); Scanner ciao = new Scanner(System.in); String line, name="", excuse=""; - int prog=0, phys=0, math=0, chems=0; + int prog=0, phys=0, math=0, chem=0; double gpa = 0.0; boolean Success = true,need=false; System.out.println("Welcome to the Attendance and Grade System!\nThis is the bonus part of the task\nEvery detail will be taken from the txt file. \nEnjoy!") ; @@ -23,7 +25,7 @@ public static void main(String[] args) throws Exception { phys = Integer.parseInt(line.substring(20).trim()); } if (line.startsWith("Chemistry Attendance: ")) { - chems = Integer.parseInt(line.substring(22).trim()); + chem = Integer.parseInt(line.substring(22).trim()); } if (line.startsWith("Programming Attendance: ")) { prog = Integer.parseInt(line.substring(24).trim()); @@ -37,12 +39,12 @@ public static void main(String[] args) throws Exception { System.out.println("The attendance for each subject:"); System.out.println("Math: " + math); System.out.println("Physics: " + phys); - System.out.println("Chemistry: " + chems); + System.out.println("Chemistry: " + chem); System.out.println("Programming: " + prog); System.out.println("Students' GPA: " + gpa); while(need){ line = reader.readLine(); // read a new line - if (math < 44 || phys < 42 || chems < 40 || prog < 47) { + if (math < 44 || phys < 42 || chem < 40 || prog < 47) { System.out.print("The excuse of absence: "); if (line.startsWith("Excuses: ")) { excuse = String.valueOf(line.substring(9).trim()); @@ -50,8 +52,8 @@ public static void main(String[] args) throws Exception { } int index = excuse.indexOf("hospital"); if (index != -1) { - math++;prog++;chems++;phys++; - if(math < 44 || phys < 42 || chems < 40 || prog < 47){ + math++;prog++;chem++;phys++; + if(math < 44 || phys < 42 || chem < 40 || prog < 47){ Success = false; } } @@ -65,13 +67,27 @@ public static void main(String[] args) throws Exception { "\nName: "+name+ "\nMath Attendance: "+math+" days\n" + "Physics Attendance: "+phys+" days\n" + - "Chemistry Attendance: "+chems+" days\n" + + "Chemistry Attendance: "+chem+" days\n" + "Programming Attendance: "+prog+" days\n" + "Grade: "+gpa+" out of 5"); if(Success){ + try{ + w.append("\nResult: Congrats! you've success >_<"); + w.close(); + } + catch(Exception ex){ + System.out.println("Can't write in the file"); + } System.out.println("Result: Congrats! you've success >_<"); } else{ + try{ + w.append("\nResult: Oops. you failed :'("); + w.close(); + } + catch(Exception ex){ + System.out.println("Can't write in the file"); + } System.out.println("Result: Oops. you failed :'("); } } From 448b198adc9762e38f422f00cfafa93d6bb67650 Mon Sep 17 00:00:00 2001 From: Haya <145580738+H4ya@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:29:52 +0300 Subject: [PATCH 12/12] Update infoFile.txt --- infoFile.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/infoFile.txt b/infoFile.txt index fa1998b..1cbd45d 100644 --- a/infoFile.txt +++ b/infoFile.txt @@ -1,6 +1,4 @@ -You can change the wanted student by putting their info above the others -or change the details fot the first student - +You can change the wanted student by changing the details Student 1: Name: Manea Yahya Math Attendance: 48 @@ -8,4 +6,4 @@ Physics Attendance: 42 Chemistry Attendance: 50 Programming Attendance: 45 GPA: 4.12 -Excuses: Had a family emergency and went to hospital \ No newline at end of file +Excuses: Had a family emergency and went to hospital