marks 1 Answer(s) 3 years and 3 months ago
Posted in : Java Beginners
the marks obtained by 100 students in a subject are tabulated as fallow:-
NAME MARKS
wap a program to input the names and marks of the students in the subject of computer applications. calculate the display:- *average marks in the subject of computer applications/subject average marks=subject total/100). *the higest marks in the subject and the name of the students (the maximum marks in the subject are 100).
View Answers
March 5, 2010 at 2:52 PM
Hi Friend,
Try the following code:
import java.util.*;
class Student { String name; double marks; public Student(String n, double s){ name = n; marks = s; } public String getName(){ return name; } public double getMarks(){ return marks; } } public class ArrayListExample{ public static void main(String[] args){ Scanner input=new Scanner(System.in); double sum=0; String name=""; double marks=0; double maxNumber = Double.MIN_VALUE; ArrayList<Student> list = new ArrayList<Student>(); for(int i=1;i<=5;i++){ System.out.println("Enter Name: "); name=input.next(); System.out.println("Enter Marks: "); marks=input.nextDouble(); sum =sum+marks; if (marks > maxNumber) { maxNumber = marks; } list.add(new Student(name, marks)); } double average=sum/5; System.out.println("Name Marks"); for (Student s : list) System.out.println(s.getName()+" "+s.getMarks()); System.out.println("Average Marks= "+average); System.out.println("Highest Marks= "+maxNumber); System.out.println("Name of Student achieved highest marks= "); for (Student s : list){ if(maxNumber == s.getMarks()){ System.out.println(s.getName()); } } } }
Thanks
Related Pages:
Marks Marks
Giving score to article as Digg does.
Read full Description
Student Marks
. (A,B,C�..)
Marks for ââ?¬Ë?Computer Programming Assignment 1ââ?¬â?¢ (out of 25 marks)
Marks for ââ?¬Ë?Computer Programming Assignment 2ââ?¬â?¢ (out of 25 marks)
Marks for ââ?¬Ë?Computer Programming Examââ?¬â?¢ (out of 50 marks
marks - Java Beginners
marks the marks obtained by 100 students in a subject are tabulated as fallow:-
NAME MARKS
wap a program to input the names and marks of the students in the subject of computer
array of students with marks list
array of students with marks list There are 4 array of numbers or scores as below. They are called marks list and represent the scores individual... across all lists and also the number of students (4 in this case).
Marks List 1
Java Program for Calculating Marks
that requires me to a write simple java program that will calculate marks for 10 students. I must use an array to ask user to key in the marks for the 10 students. The marks consist of two tests, test 1 and test 2. I also need to calculate
Java Program for Calculating Marks
that requires me to a write simple java program that will calculate marks for 10 students. I must use an array to ask user to key in the marks for the 10 students. The marks consist of two tests, test 1 and test 2. I also need to calculate
Java Program for Calculating Marks
that requires me to a write simple java program that will calculate marks for 10 students. I must use an array to ask user to key in the marks for the 10 students. The marks consist of two tests, test 1 and test 2. I also need to calculate
Java Program for Calculating Marks
that requires me to a write simple java program that will calculate marks for 10 students. I must use an array to ask user to key in the marks for the 10 students. The marks consist of two tests, test 1 and test 2. I also need to calculate
program to print total marks
program to print total marks program to input total marks out of 600 marks as an argument and print the stream allotted using the following criteria
401 & above - PCM
301-400 - ZBC
201-300- Commerce
101-200 - Arts
program to input marks
program to input marks program to input marks ,name in computer application 7 annual fees to be paid .Decide the scholarship amount as per the given criteria
Marks Scholarship(%)on Annual Fees
=90
student marks sheet genaration in struts frame work
student marks sheet genaration in struts frame work Hi every body iam using struts frame work back end as oracle 10g xe i wanna urgent code for student marks genaration code please help me
thanks in advance
Write a program to display grade message according to the marks
to the marks..........
Here is a code that accepts the number of students and their marks and display the grade according to student's marks... marks: ");
double marks = Double.parseDouble(input
Mysql Alter Foreign Key
Mysql Alter Foreign Key
A Foreign Key is a field that marks to the primary key of another
table. The use of the foreign key is used to ensure referential
Finnix
distribution for system administrators, based on Debian testing. Today marks... testing. Today marks the release of version
87.0 for the x86, PowerPC, UML/Xen... for system administrators,
based on Debian testing. Today marks the release
programming - IDE Questions
programming A student?s marks and status is determined according to the following schedule:
Marks Status
Greater than or equal to 75 Excellent... than 40 Fail
Your program should display the Marks and Status for 5 subjects
i/o
the following information regarding the marks for 10 students in a test
i. Matric no
ii. Marks for question 1
iii. Marks for question 2
iv. Marks for question 3
v. Marks for question 4
vi. Marks for question 5
vii. Total marks
package - Java Beginners
Creating a package in Java Create a package called My Package. In this, create a class call Marks that specifies the name of student, the marks in three subjects and the total of these marks. Displays the details of three
poonik
poonik sir plz tell me the logic in java if we input grades(A,B,C..) in marksheet then automatically it converts our grade into marks (1,2,3..)and giva a total marks in marks format(1,2,3
flowchart and algorithm
++) {
System.out.println("Enter marks");
double marks...(marks);
if (marks < 40) {
data[i].setGrade("E");
}
if (marks >= 40 && marks <= 44) {
data[i
Please help with this Q
to enter in various marks which students have been awarded, until the tutor enters... should work with any number of student marks entered.
After the histogram...
{
public static void main(String args[])
{
float marks[]=new float[20
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
passing data between the jsp pages ?
on student marks system.in this project their is one html page which asks user to enter... .on that jsp page it retrieve marks regarding the particular roll number and displays the marks and i write another jsp which will calculate the percentage
Swing Program
Swing Program Write a java swing program that takes name and marks as input with all validation. The name and marks will be displayed in message box when user clicks on a button
convert this code to GUI
; a++) {
System.out.print("Enter student
programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student
programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
convert this code to GUI
; a++) {
System.out.print("Enter student
programming marks: ");
double marks = input.nextDouble();
data[a] = new StudentGrade();
data[a].setTotalMarks(marks);
if (marks < 40
How to write Java Program
How to write Java Program how to write a program to find average of 5 student marks
jsp and java
jsp and java how to write a jsp and related java code to enter student marks into database
assig
assig use wrapper classes by implementing a program to calculate the percentage of marks in five courses of an MCA student
Quries
Quries a JAVA program to calculate the percentage of a student marks by using java arithmetic operators like +(addition), % (division
Read text file to 2D array and sorting the second column
that the student names with marks in a text file the marks decreases significantly... and the second column is marks in tests.What we need to find is which student marks... are good students if the marks decreases next time again. Then in the next step we can
Please help in drawing Flowchart
with marks in a text file the marks decreases significantly. when exams conducted fast 4 times.THe first column is the student name and the second column is marks in tests.What we need to find is which student marks decreases most often
java
;
}
public String toString(){
return ("Invalid Marks entered! "+ str...{
Scanner input=new Scanner(System.in);
System.out.print("Enter marks: ");
int marks=input.nextInt();
if(marks < 15){
throw new
Java User-defined Exception
a user defined
exception if the student marks entered, is less than fifteen...;Invalid Marks entered! "+ str) ;
}
}
class UserDefinedException...);
System.out.print("Enter marks: ");
int marks=input.nextInt
java compilation - UML
:
import java.util.*;
class Student {
String name;
double marks;
public Student(String n, double s){
name = n;
marks = s... getMarks(){
return marks;
}
}
public class ArrayListExample
How to convert this Java code into GUI?
; data.length; i++) {
System.out.println("Enter marks");
double marks = input.nextDouble();
data[i] = new StudentMarks();
data[i].setTotalMarks(marks);
if (marks < 40
Need Help in Java programming
such as:assignment number,assignment name,due date,submission date,percentage marks and allocated marks.
student information for this assignment details.
Regards
help to write java code
will calculate all items to get total carry-marks which are 60 marks. and get sum of assignment 1,assignment 2, midterms-test and lave work to get total marks. the GUI should hae a title: carry marks calculator, and a label As shown:
[please