flow chart

flow chart

can you provide the flowchart of this coding.

import java.util.*;

public class StudentMarks{

double totalMarks;
String grade;

public void setTotalMarks(double totalMarks){
this.totalMarks=totalMarks;
}
public double getTotalMarks(){
return totalMarks;
}
public void setGrade(String grade){
this.grade=grade;
}
public String getGrade(){
return grade;
}
public static void main(String[]args){
Scanner input=new Scanner(System.in);
System.out.print("Enter number of students: ");
int num=input.nextInt();
StudentMarks data[]=new StudentMarks[num];
for (int i=0; i<data.length; i++) {
System.out.println("Enter marks");
double marks=input.nextDouble();
data[i] = new StudentMarks();
data[i].setTotalMarks(marks);
if(marks<40){
data[i].setGrade("FAIL");
}
if(marks>=40&&marks<=50){
data[i].setGrade("E");
}
if(marks>50&&marks<=59){
data[i].setGrade("D");
}
if(marks>60&&marks<=70){
data[i].setGrade("C");
}
if(marks>70&&marks<=85){
data[i].setGrade("B");
}
if(marks>85&&marks<=95){
data[i].setGrade("A");
}
if(marks>95){
data[i].setGrade("A+");
}

}
int count1=0,count2=0,count3=0,count4=0;
for(int i=0;i<num;i++){
StudentMarks show = data[i];
String g = show.getGrade();
if(g.equals("A+")){
    count1++;
}
if(g.equals("A")){
    count2++;
}
if(g.equals("D")){
    count3++;
}
if(g.equals("E")){
    count4++;
}
}
System.out.println("Number of student getting A and A+ grade: "+(count1+count2));
System.out.println("Number of student getting D and E grade: "+(count3+count4));


}
}
View Answers

Ads









Related Tutorials/Questions & Answers:
flow chart
flow chart  can you provide the flowchart of this coding. import java.util.*; public class StudentMarks{ double totalMarks; String grade; public void setTotalMarks(double totalMarks){ this.totalMarks=totalMarks
flow chart
flow chart  can you provide the flowchart of this coding. import java.util.*; public class StudentMarks{ double totalMarks; String grade; public void setTotalMarks(double totalMarks){ this.totalMarks=totalMarks
Advertisements
jfree chart
jfree chart  i need donut chart using jfree
pie chart
pie chart  how to create pie chart using struts2
Pie chart
Pie chart  hi................. In my project i want to create a pie-chart by taking values at run time. As want to display it in pie chart form....   Java Swing PIE Chart
bar chart
bar chart  how to create a bar chart from values of the database and the string value should be the entities of the database??plzz help..needed badly
flow charts
flow charts   draw a flow chart program with a user prompt of 5 numbers computing the maximum, minimum and average
ModuleNotFoundError: No module named 'chart'
ModuleNotFoundError: No module named 'chart'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'chart' How to remove the ModuleNotFoundError: No module named 'chart'
draw chart in web application
draw chart in web application  how to draw bar chat from the record store in database? i.e. draw the bar chart according to selected record
Version of be.ceau>chart dependency
List of Version of be.ceau>chart dependency
Version of com.intersult>chart dependency
List of Version of com.intersult>chart dependency
Bar chart implementation in PHP
Bar chart implementation in PHP  How to implements reports in bar graphs by using PHP
Clickable chart with Tool Tip
Clickable chart with Tool Tip  Can we generate the charts with tooltip and onclick events using jfreechart in jsps and servlets
line chart from database in jsp
line chart from database in jsp  how can i create line chart from database in jsp code
Pie chart on jsp
Pie chart on jsp  how can i create a pie chart on a jsp page using... that creates a pie chart using JFreechart api and takes the value from..."); dataset.executeQuery(query); JFreeChart chart = ChartFactory.createPieChart
JFree chart package error
JFree chart package error  hi, I had asked u abt the jfree chart package and done what u have said. Its working but its giving me error that some... the jcommon jar file and jfree jar file for the bar chart code. but now its giving
Stacked Bar Chart
Stacked Bar Chart  How to display a stacked bar chart using java from the values stored in the ms access database?Plzz help..its urgent
How to draw pie chart in J2ME
How to draw pie chart in J2ME  Hi, I'm developing a program using J2ME and I want to draw a pie chart but it seems J2ME language hasn't available chart component like JFreeChart in Java! could any one help me how can I draw a pie
Table-chart selection
Table-chart selection  Hai, Our application has pdf download.The pdf file has chart and table..Now the problem is user choose only table option but table and chart download..i want table only..the coding was given below
Export chart to JPEG file
Export chart to JPEG file  Hi. I have one problem. I have generated piecharts and barcharts using chartlib.js and jquery in jsp. Now i want to export this charts to jpeg file . how can i do this? Thank q in advance
Create pie chart
Create pie chart  hi............. In my project i want to create a pie chart to display the result. i require a very simple code in java swings were i can edit the code and put my values... so plz help me
ModuleNotFoundError: No module named 'bcra_chart'
ModuleNotFoundError: No module named 'bcra_chart'  Hi, My Python... 'bcra_chart' How to remove the ModuleNotFoundError: No module named 'bcra_chart' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'chart-studio'
ModuleNotFoundError: No module named 'chart-studio'  Hi, My Python... 'chart-studio' How to remove the ModuleNotFoundError: No module named 'chart-studio' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'dj-chart'
ModuleNotFoundError: No module named 'dj-chart'  Hi, My Python...-chart' How to remove the ModuleNotFoundError: No module named 'dj-chart... to install padas library. You can install dj-chart python with following
ModuleNotFoundError: No module named 'dj-chart'
ModuleNotFoundError: No module named 'dj-chart'  Hi, My Python...-chart' How to remove the ModuleNotFoundError: No module named 'dj-chart... to install padas library. You can install dj-chart python with following
ModuleNotFoundError: No module named 'dj-chart'
ModuleNotFoundError: No module named 'dj-chart'  Hi, My Python...-chart' How to remove the ModuleNotFoundError: No module named 'dj-chart... to install padas library. You can install dj-chart python with following
ModuleNotFoundError: No module named 'jmbo-chart'
ModuleNotFoundError: No module named 'jmbo-chart'  Hi, My Python... 'jmbo-chart' How to remove the ModuleNotFoundError: No module named 'jmbo-chart' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'nimbus-chart'
ModuleNotFoundError: No module named 'nimbus-chart'  Hi, My Python... 'nimbus-chart' How to remove the ModuleNotFoundError: No module named 'nimbus-chart' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'panya-chart'
ModuleNotFoundError: No module named 'panya-chart'  Hi, My Python... 'panya-chart' How to remove the ModuleNotFoundError: No module named 'panya-chart' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'Python-Chart'
ModuleNotFoundError: No module named 'Python-Chart'  Hi, My Python... 'Python-Chart' How to remove the ModuleNotFoundError: No module named 'Python-Chart' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'Python-Chart'
ModuleNotFoundError: No module named 'Python-Chart'  Hi, My Python... 'Python-Chart' How to remove the ModuleNotFoundError: No module named 'Python-Chart' error? Thanks   Hi, In your python

Ads