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









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
chart tutorial - Java3D
chart tutorial  Hi I need a JFree Chart class library in order to design a chart with java  Hi friend, For JFree Chart class library... information,Tutorials and Examples on JFree Chart visit to : http://www.roseindia.net
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
Bar chart implementation in PHP
Bar chart implementation in PHP  How to implements reports in bar graphs by using PHP
surface chart - Java3D
surface chart  i have to make a surface chart of a piece of land with data given for each point in the xy plane....the chart should be such that the areas with different data range should show up in different colour. seriously
3d pie chart - Java3D
3d pie chart  Dear Sir, i want to create 3d pie chart using jsp, i have some code for 2d pie chart in jsp and 3d pie chart in applet. for 2d pie chart my jsp page is running properly but for 3d i used some code from applet
Jfree chart problem - Swing AWT
Jfree chart problem  hello i have a problem related to jfree chart i have some data and i want to display data in two different chart stacked area chart and line chart both in a single frame. That is hybrid combination
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
Chart - Java Beginners
"); ChartUtilities.saveChartAsJPEG(image, chart, 400, 300); pw.println(" Display Chart"); Dis.html... system with help of URL.The chart is not coming.Its display empty page
create chart - JSP-Servlet
.jrxml report. I want to create a chart using ireport software. I m using sql...(primary key) title status I want to show chart of field "date" only... and free hours is green are filled that chart So pls help me to solve
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
JFREE chart - Java Beginners
..thanks,i want my chart to display dynamically from my database  Hi... database on your chart
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
chart library - Java3D
chart library  hi Where can i download jfreechart-1.0.4-demo.jar and jcommon-1.08.jar files  Hi friend, For download jfreechart-1.0.4-demo.jar and jcommon-1.08.jar files visit to : http://www.roseindia.net
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 '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 '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
ModuleNotFoundError: No module named 'radar-chart'
ModuleNotFoundError: No module named 'radar-chart'  Hi, My Python... 'radar-chart' How to remove the ModuleNotFoundError: No module named 'radar-chart' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'shot-chart'
ModuleNotFoundError: No module named 'shot-chart'  Hi, My Python... 'shot-chart' How to remove the ModuleNotFoundError: No module named 'shot-chart' error? Thanks   Hi, In your python environment you
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 '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
i want to show timeline chart for three year in chart..
i want to show timeline chart for three year in chart..  I am using Jfree chart library to display chart in web pages. i want to show three year data in chart in 3 lines for three year in same chart. i am able to show
java line chart
java line chart  Hi, I want to draw a graphic in java line chart and ? searched the documents ?n the web. I found the example codes ?n your site (http://www.roseindia.net/chartgraphs/xyline-chart.shtml) and tr?ed ?n my
XYArea Chart
XYArea Chart      ... a XYArea Chart. Description of Program    For creating a XYArea Chart we.... Then we add the data in this object that will show in our XYArea chart. After
Create a Pie Chart in jsp Page using JFree Chart
Create a Pie Chart in jsp Page using JFree Chart  Hello Sir I followed ur tutorial on "CREATE A PIE CHART IN JSP PAGE USING JFREE CHART... the pie chart report and after that save it to the desired location.Kindly help me
WaterFall Chart
WaterFall Chart      ... Chart. Description of Program : For creating a WaterFall chart we use... color of chart and adjust the color the title etc.ADS_TO_REPLACE_1 Description
Pie Chart
Pie Chart       In this section we are providing you an example to create a Pie Chart. Description of Example   For creating a Pie Chart we use PieDataset
XYLine Chart
XYLine Chart       In this section we are providing you an example to create a XYLine Chart. Description of Program    For creating a XYLine Chart we have
Polar Chart
Polar Chart       In this section we are providing you an example to create a Polar Chart. Description of ProgramADS_TO_REPLACE_1 For creating a Polar Chart we use
Bar Chart
Bar Chart       In this section we are providing you an example to create a Bar Chart. Description of Program  For creating a Bar chart we use the object

Ads