Jeannie Kaw

Greenhorn
+ Follow
since Apr 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jeannie Kaw

can someone tell me what's the disadvantages and advantages for Arrays
Thks in advance
21 years ago
Okie, thks everybody. Again, I need u guys help.
1)So right now, I've paste the program elsewhere. Can u tell me how to println the user input, which meant once user input 1 student record:the name n 3 subjects marks, then the program will compute the result and print out with the heading.without going via to enter 4 students records then can be performed.
2) This program can compute/println 4 students records only, can i increase the array up to contains 15 students records?
How shd i modify the program?
3) Can i chose a option like say, the program will println only, when the user enter the command key. For instance:
show=println
insert=new student record
exit=escape.
I want to know is my program able to add on this option. How am i going to go abt?
Below is my source code, can someone amend on the code itself? Thks alot for your assistance.
==================================================


[ May 02, 2002: Message edited by: Dirk Schreckmann ]
21 years ago
Hi, I'm a idiot beginner in Java who have limited knowledge in this lang. Even so, I have 1 program which i not able to complete here. Here is the program aspects which i need to fulfill
Develop this program in Application which will perform the following functions:
Create a record contains 15 students and read the input from user.
1) We are free invited to enter the details of a Student with the name,
and enter the 3 Marks obtained in each 3 subjects.(like..Integer.parseInt(input);read their input
2) Calculate the average test score of each student.
3) Display the name of the student and test score according to their grade esTination, Credit, Pass
or Failed.
Fail=less than 40
Pass=less than 60 more than 40
Credit=Less than 70 more than 60
Destination=More than 70
4) Calculate and display the highest and lowest average score.
5) Develop in Application and print out the input from what user entered.
The report program should display in this format.
Roger Investigation Company
=====================================================================
S.No Name of Student Marks in 3 subject Average Grade
Mark1 Mark2 Mark3
=====================================================================
1. Mayer 65 79 24 56 PASS
2. Raite 55 78 69 67.33 CREDIT
3.......................................
4. .....................................
till 15 students.
=====================================================================
Highest Average = 67
Lowest Average = 56
Below is the source code which i completed, however it shd said incomplete.
-------------------------------------------------

--------------------------------------------------
My problem is that how i going to create array within array, I'm not able to figure at here. And i got errors when i javac...etc :
int[] incompatiable types.
Could someone show me how to work this program out. I'd appreciate your patience in solving this program.
Jeannie
[ May 02, 2002: Message edited by: Dirk Schreckmann ]
21 years ago
Hi everybody,
I need ur assistance, as this program have errors, which i unable to correct it.
Appreciate your assistance on this matter.
Create a record contains 15 students and read the input from user.
1) We are free invited to enter the details of a Student with the name,and enter the 3 Marks obtained in each 3 subjects. (like..Integer.parseInt(input);read their input)
2) Compute the average score for each student, then display the highest average score and lowest average score.
Develop in Application and print out the input from what user entered.
Below is the source code
==================================================

//run this program as GoodLuck.java
import java.io.*;
import java.lang.*;
class GoodLuck
{
public static void main(String args[]) throws IOException
{
String[] name = new String[15];
int[] students = new int[15];
String Studname;
int mark1, mark2, mark3;

BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter your Name:");
System.out.println("Enter your mark1");
System.out.println("Enter your mark2");
System.out.println("Enter your mark3");

for(int i =0; i <=14; i++)
{
Studname = input.readLine();
mark1= Integer.parseInt(input.readLine());
mark2= Integer.parseInt(input.readLine());
mark3= Integer.parseInt(input.readLine());
name[i] =Studname;
students[i] = mark1;
students[i] = mark2;
students[i] = mark3;

};
double highestAvg = -1.0;
double lowestAvg = 101.0;


for (int i = 0; i < students.length; i++)

for (int i = 0; i < students.length; i++)
{
double avg = (students[i].mark1 + students[i].mark2 +
students[i].mark3) / 3.0;
if (avg > highestAvg)
highestAvg = avg;
if (avg < lowestAvg)
lowestAvg = avg;
System.out.print (students[i].name + " " +
students[i]+ " " +
students[i]+ " " +
students[i]+ " " + avg + " ");
if (avg < 40)
System.out.println ("FAIL");
else
if (avg < 60)
System.out.println ("PASS");
else
if (avg < 70)
System.out.println ("CREDIT");
else
System.out.println ("DISTINCTION");
}
System.out.println ();

System.out.println ("Highest Average = " + highestAvg);
System.out.println ("Lowest Average = " + lowestAvg);
}
}
21 years ago
If I want to design an interface/Application which will perform the following functions:
Create a record contains 15 students and read the input from user.
1) We are free invited to enter the details of a Student with the name,
and enter the 3 Marks obtained in each 3 subjects.(like..Integer.parseInt(input);read their input
2) Calculate the average test score of each student.
3) Display the name of the student and test score according to their grade esTination, Credit, Pass
or Failed.
Fail=less than 40
Pass=less than 60 more than 40
Credit=Less than 70 more than 60
Destination=More than 70
4) Calculate and display the highest and lowest average score.
5) Develop in Application and print out the input from what user entered.
The report program should display in this format.
Roger Investigation Company
=====================================================================
S.No Name of Student Marks in 3 subject Average Grade
Mark1 Mark2 Mark3
=====================================================================
1. Mayer 65 79 24 56 PASS
2. Raite 55 78 69 67.33 CREDIT
3.......................................
4. .....................................
till 15 students.
=====================================================================
Highest Average = 67
Lowest Average = 56

(edited by Cindy to format code)
[ April 30, 2002: Message edited by: Cindy Glass ]
21 years ago