119 lines
3.3 KiB
Java
119 lines
3.3 KiB
Java
package calcul;
|
|
|
|
import java.text.DecimalFormat;
|
|
|
|
public class calculNotesProgression {
|
|
String messageHTMLColonne="";
|
|
String messageHTMLLigne="";
|
|
String messageLigne="";
|
|
String messageColonne="";
|
|
|
|
double Note25pourcent;
|
|
double Note50pourcent;
|
|
double Note75pourcent;
|
|
|
|
|
|
public calculNotesProgression(Double progression, Double noteFrom) {
|
|
double Note25pourcent = Math.pow(0.25, progression)*noteFrom ;
|
|
double Note50pourcent = Math.pow(0.5, progression)*noteFrom ;
|
|
double Note75pourcent = Math.pow(0.75, progression)*noteFrom ;
|
|
DecimalFormat f = new DecimalFormat("#00.00");
|
|
|
|
this.messageHTMLColonne = "<html>00% correct → 00.00 / "+ noteFrom + "<br>"
|
|
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + "<br>"
|
|
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + "<br>"
|
|
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + "<br>"
|
|
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "<html>";
|
|
|
|
this.messageHTMLLigne = "<html>00% correct → 00.00 / "+ noteFrom + ""
|
|
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + " ; "
|
|
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + " ; "
|
|
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + " ; "
|
|
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "<html>";
|
|
|
|
this.messageLigne = "00% correct → 00.00 / "+ noteFrom + ""
|
|
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + " ; "
|
|
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + " ; "
|
|
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + " ; "
|
|
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "";
|
|
|
|
this.messageColonne = "00% correct → 00.00 / "+ noteFrom + "\n"
|
|
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + "\n"
|
|
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + "\n"
|
|
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + "\n"
|
|
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "";
|
|
|
|
}
|
|
|
|
|
|
public String getMessageHTMLColonne() {
|
|
return messageHTMLColonne;
|
|
}
|
|
|
|
|
|
public void setMessageHTMLColonne(String messageHTMLColonne) {
|
|
this.messageHTMLColonne = messageHTMLColonne;
|
|
}
|
|
|
|
|
|
public String getMessageHTMLLigne() {
|
|
return messageHTMLLigne;
|
|
}
|
|
|
|
|
|
public void setMessageHTMLLigne(String messageHTMLLigne) {
|
|
this.messageHTMLLigne = messageHTMLLigne;
|
|
}
|
|
|
|
|
|
public String getMessageLigne() {
|
|
return messageLigne;
|
|
}
|
|
|
|
|
|
public void setMessageLigne(String messageLigne) {
|
|
this.messageLigne = messageLigne;
|
|
}
|
|
|
|
|
|
public String getMessageColonne() {
|
|
return messageColonne;
|
|
}
|
|
|
|
|
|
public void setMessageColonne(String messageColonne) {
|
|
this.messageColonne = messageColonne;
|
|
}
|
|
|
|
|
|
public double getNote25pourcent() {
|
|
return Note25pourcent;
|
|
}
|
|
|
|
|
|
public void setNote25pourcent(double note25pourcent) {
|
|
Note25pourcent = note25pourcent;
|
|
}
|
|
|
|
|
|
public double getNote50pourcent() {
|
|
return Note50pourcent;
|
|
}
|
|
|
|
|
|
public void setNote50pourcent(double note50pourcent) {
|
|
Note50pourcent = note50pourcent;
|
|
}
|
|
|
|
|
|
public double getNote75pourcent() {
|
|
return Note75pourcent;
|
|
}
|
|
|
|
|
|
public void setNote75pourcent(double note75pourcent) {
|
|
Note75pourcent = note75pourcent;
|
|
}
|
|
|
|
}
|