473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Grades

I need help on this code. I have to write a code that reads in a list of exam scores and outputs the total number of grades and the total number of grades in each letter category. Here is what I got so far.


//Grades.java Anthony Biddle September 30, 2006
//Get a list of grades and output the total number of grades and number of grades
//in each letter category

public class Grades {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub


System.out.println("This program will read a list of scores and will output the ");
System.out.println("total number of grades and number of grades in each letter category");
//Prompt the user to enter grades on the line
System.out.println("Enter grades on the line");

int n1, n2, n3;

Scanner keyboard = new Scanner(System.in);
n1 = keyboard.nextInt();
n2 = keyboard.nextInt();
n3 = keyboard.nextInt();


System.out.println("Enter a negative number on the line after all the grades are entered");
System.out.println("You have entered all the grades");

System.out.println("The total number of grades are");


System.out.println("Grades program complete
Oct 7 '06 #1
1 3082
r035198x
13,262 8TB
I need help on this code. I have to write a code that reads in a list of exam scores and outputs the total number of grades and the total number of grades in each letter category. Here is what I got so far.


//Grades.java Anthony Biddle September 30, 2006
//Get a list of grades and output the total number of grades and number of grades
//in each letter category

public class Grades {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub


System.out.println("This program will read a list of scores and will output the ");
System.out.println("total number of grades and number of grades in each letter category");
//Prompt the user to enter grades on the line
System.out.println("Enter grades on the line");

int n1, n2, n3;

Scanner keyboard = new Scanner(System.in);
n1 = keyboard.nextInt();
n2 = keyboard.nextInt();
n3 = keyboard.nextInt();


System.out.println("Enter a negative number on the line after all the grades are entered");
System.out.println("You have entered all the grades");

System.out.println("The total number of grades are");


System.out.println("Grades program complete
Haven't you already asked this question before?
Oct 8 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jackie | last post by:
I have about 7000 student records of college entrance exam records. i want to build a form where I can select a range of scores in a combobox and return a list of students with scores in the...
11
by: Penfold | last post by:
I'd appreciate help converting student average test scores into grades. My problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c etc through to 8c plus a couple of others)....
4
by: vadrama | last post by:
takes a list of grades and counts the amount A's, B's, C's etc... I am using a while statement to count the total number of grades which works great, but my if and else statements to count how...
2
by: tatum | last post by:
I really just need some pointers... jumping points from here... something the problem: Write a grading program for a class with the following grading policies: 1. There are two quizzes,...
1
by: angeldeveloper | last post by:
Start Declare: lastName, finalGrade, outfile Open "grades.dat" For Output As outfile Write "Enter last name and final grade separated by spaces: " Write "Enter 0 for both when...
2
by: gdarian216 | last post by:
the program reads input from a file and then outputs the averages and grade. for some reason it is reading in the same line twice and it doesn't print out the grade. everything else is correct, if...
2
by: Richard Hollenbeck | last post by:
I originally wrote my grades program in MS-Access to help community college teachers in the California community colleges keep track of their students' grades and produce reports for the students...
8
by: midknight5 | last post by:
Heya everyone, I am a freshman in college and am taking C++. This is not a begging thread for someone to solve my problem because I am interested in learning this myself. So here is my question:...
3
by: Energizer100 | last post by:
Hey. I'm new to Java and I'm trying to make a grades program for a class assignment. This is what I have so far. import java.util.Scanner; import static java.lang.System.out; public class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.