0
I had a job which are given by my collage to make a mini project give me some project ideas
mini project
3 Answers
+ 2
Create a web page about your favorite hobby or a favorite recipe
+ 2
Hi
I need flowchart of thisđ code!
Can you help me?
+ 1
import java.util.Scanner;
public class MyClass {
public static void main(String[] args) {
int courseNo = 4;
int studentNo = 3;
double[] courses = new double[courseNo];
double[] units = new double[courseNo];
double[] studentAverage = new double[studentNo];
double sumPoint, sumUnit, average;
Scanner input = new Scanner(System.in);
for (int j = 0; j <studentNo ; j++) {
sumPoint = 0; sumUnit = 0;
for (int i = 0; i < courseNo; i++) {
System.out.print("Enter course Point: ");
courses[i] = input.nextDouble();
System.out.print("Enter course Unit: ");
units[i] = input.nextDouble();
sumPoint = sumPoint + (courses[i] * units[i]);
sumUnit = sumUnit + units[i];
}
average = sumPoint / sumUnit;
studentAverage[j] = average;
}
double max = studentAverage[0];
int studentNumber=1;
for(int i=1;i<studentNo;i++){
if(studentAverage[i]>max){
max = studentAverage[i];
studentNumber = i+1;
}
}
System.out.println("student#"+studentNumber+" is the best student with avrage "+max);
for(int k=0;k<studentNo;k++) {
int s = k + 1;
System.out.println("average student#" + s + " : " + studentAverage[k]);
}
}
}