ajout .gitignore + modif makefile et BDatabase.java

This commit is contained in:
brinet 2022-12-01 16:02:29 +01:00
parent c40366e4e2
commit 14ebaedeeb
3 changed files with 23 additions and 1 deletions

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# Compiled class file
*.class
# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar*

View File

@ -1,5 +1,5 @@
# Commandes # Commandes
JAVAC = javac JAVAC = javac -encoding UTF-8
JAVA = java JAVA = java
JAR = $(JAVA) -jar JAR = $(JAVA) -jar
JAVADOC = javadoc JAVADOC = javadoc

View File

@ -251,4 +251,16 @@ public class BDatabase {
public String toString() { public String toString() {
return this.db_host + "\n" + this.db_name + "\n" + this.db_user + "\n"; return this.db_host + "\n" + this.db_name + "\n" + this.db_user + "\n";
} }
/***
* Recupere le nombre d'etudiant par groupe
* @return
*/
public ArrayList<NBGroupe> getNbrEtuGroupes() {
ArrayList<NBGroupe> NGroupe = new ArrayList<>();
ArrayList<String> groupeNB = this.fetchAll("SELECT COUNT(DISTINCT groupe) FROM fi_eleves;");
for(int i = 0; i <= NGroupe.Goupe(groupeNB); i++) {
ArrayList<String> grpnb = this.fetchAll("Select count(id) from fi_eleves where groupe="+i+";");
}
}
} }