Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  




Share on Google+Share on Google+

1 Answer(s)      7 years ago
Posted in : Java Beginners
View Answers

October 13, 2009 at 3:06 PM

Hi Friend,

Try the following code:

import java.util.*;

public class Student{
int matricNo;
double quizMarks;
double assignMarks;
double test1Marks;
double test2Marks;
double finalMarks;
double totalMarks;
String grade;
public void setMatricNo(int matricNo){
public int getMatricNo(){
return matricNo;
public void setQuizMarks(double quizMarks){
public double getQuizMarks(){
return quizMarks;
public void setAssignMarks(double assignMarks){
public double getAssignMarks(){
return assignMarks;
public void setTest1Marks(double test1Marks){
public double getTest1Marks(){
return test1Marks;
public void setTest2Marks(double test2Marks){
public double getTest2Marks(){
return test2Marks;
public void setFinalMarks(double finalMarks){
public double getFinalMarks(){
return finalMarks;
public void setTotalMarks(double totalMarks){
public double getTotalMarks(){
return totalMarks;
public void setGrade(String grade){
public String getGrade(){
return grade;
public static void main(String[]args){
Scanner input=new Scanner(;
Student data[]=new Student[2];
for (int i=0; i<data.length; i++) {
System.out.println("Enter Matric No");
int no=input.nextInt();
System.out.println("Enter quiz marks");
double q=input.nextDouble();
System.out.println("Enter Assignment marks");
double a=input.nextDouble();
System.out.println("Enter test1 marks");
double t1=input.nextDouble();
System.out.println("Enter test2 marks");
double t2=input.nextDouble();
System.out.println("Enter final marks");
double f=input.nextDouble();
double tm=.15*q+.15*a+.15*t1+.15*t2+.40*f;
System.out.println("Total Marks="+tm);
data[i] = new Student();

for(int i=0;i<2;i++){
Student show = data[i];
int no1=show.getMatricNo();
double q1=show.getQuizMarks();
double a1=show.getAssignMarks();
double t11=show.getTest1Marks();
double t21=show.getTest2Marks();
double f1=show.getFinalMarks();
double tm1=show.getTotalMarks();
String g = show.getGrade();
System.out.println(no1 + " " + q1 + " " + a1+" "+t11+" "+t21+" "+f1+" "+tm1+" "+g);


Related Tutorials/Questions & Answers:
Student database
Student database  Create a class Student with Name, Gender, and Date of Birth and Input Student and print as ?Dear Mr/Mrs Name, your Age is 99 Years?. Mr/Mrs - only one should be displayed based on their age and Gender
student details
student details  hi sir/madam i have a doubt in PHP how to insert student details using mysql with php..   Have a look at the following link: PHP Mysql insert
student details
student details  create an application for details of 1st to 5th standard students by using loops and scanner
student info
student info  code of insert,delete,update,view,search of student information using jsp and servelts   Hi Friend, Please visit the following links: http
student database
student database  student records such as fees-school fees, dob,age,if any due.the record stored should be like this record,name,age,dob,fee list or any dues of the student record1 isha 15 20jan record2 spandana 14 4feb record3
Student average
Student average  you are an academic requirement... that reads student's number of subject taken, the final grade of each subject... should display the average grade of the student and would display the message
Student Marks
Student Marks  Hi everyone I have to do this java assignment... programming grades of 8 IT students. Randomly create student numbers for each... in an array. Addresses of Students and store them in array. Previous Grade for student
Student Marks
Student Marks  Create a simple application which can calculate 5 marks entered by user and find the grade. Create a simple application which can calculate 5 marks entered by user and find the grade. You must display the grade
student information system
student information system  can you show me example of "student information system" pseudo code and flow chart with "student name, student id, student residential hall, student course, student phone numbers
html code for student information?
html code for student information?  html code for student information
student admission system project
student admission system project  College Student Admission System... Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based,its urgent sir
school student attendence report
school student attendence report  Hi i want school student attendence genaration source code please urgent help me
student weekly attandence genaration
student weekly attandence genaration  Hievery body iam doing student project in that i want student weekly ,yearly attendence generation report this project doing on struts frame front as java back end as oracle 10 g
STUDENT MANAGEMENT SYSTEM  can any one help me with the coding if this using awt please!!!!!!! STUDENT MANAGEMENT SYSTEM Table details Student...:insert/update/delete/search student:insert/update/delete/search :result entry
project for Student Admission System
project for Student Admission System  I want Mini Java Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way
Student Management System
Student Management System  Hi , Friend can i get the solution for connecting login page of JFrames to JDBC
college student admission
college student admission  Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based on Enterance Exam Marks
student attendence report
student attendence report  Hi every body iam doing a school project iam using backend as oracle 10g front end as java . in my project generate student attendence daywise ,monthly ,halfyearly and yearly how i generate plz
Student - Java Beginners
Student  Create a class named Student which has data fields of student metric number, mark for the quizzes (15% from the total mark), lab assignments..., Try the following code: import java.util.*; public class Student{ int
student registration example
student registration example  1.reg.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http
genarating student weekly progress report
genarating student weekly progress report  Hi every one iam using struts frame work backend as oracle 10g . i want code for how to genarate student weekly and monthly marks . thanks in advance
Tutorial college Student Admission System
Tutorial college Student Admission System  I want PHP Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way..... please send me synopsis
creating an applet for student management system
creating an applet for student management system  Write an applet/awt... a student management system having the following characteristics: The interface... it to act), and reasonably realistic. It must accept the student id,name,age,address
sorting student record - Java Beginners
sorting student record  Program in java for inserting, recording, deleting, editing and searching student details   can u explain about recording ? u want to store value in database or in file or opertinng run time
Write a program to get student details and store in a database
Write a program to get student details and store in a database  Write a program to get student details and store in a database
how to develop student details using springs
how to develop student details using springs  how to develop student details using springs
Student Information System in Java - Java Beginners
Student Information System in Java  Hello Sir, I want Mini Java Project for Student Admission System.  Hi Friend, Can you provide us details regarding your project like student admission form, faculty information