Skip to main content

Java Program to Make Student Progress

Student Progress





The First Class is Student Class:-  

public class Student {

private string first_name;
//private String last_name;
private string father_name;
private string Address;
private string chem_marks;
private String phy_marks;
private String bio_marks;
private String math_marks;
private String eng_marks;

public Student(string first_name,String father_name , String Address , String chem_makrs , String phy_marks , String bio_marks , String math_marks , String eng_marks )
{

super();

this.first_name = first_name;
this.father_name= father_name;
this.Address = Address;
this.chem_marks= chem_marks;
this.phy_marks= phy_marks;
this.bio_marks= bio_marks;
this.math_marks= math_marks;
this.eng_marks= eng_marks;

}




public String getFirst_name() {
return first_name;
}
public void setFirst_name(String first_name) {
this.first_name = first_name;
}
/*public String getLast_name() {
return last_name;
}
public void setLast_name(String last_name) {
this.last_name = last_name;
}**/
public String getFather_name() {
return father_name;
}
public void setFather_name(String father_name) {
this.father_name = father_name;
}
public String getAddress() {
return Address;
}
public void setAddress(String address) {
Address = address;
}
public String getChem_marks() {
return chem_marks;
}
public void setChem_marks(String chem_marks) {
this.chem_marks = chem_marks;
}
public String getPhy_marks() {
return phy_marks;
}
public void setPhy_marks(String phy_marks) {
this.phy_marks = phy_marks;
}
public String getBio_marks() {
return bio_marks;
}
public void setBio_marks(String bio_marks) {
this.bio_marks = bio_marks;
}
public String getMath_marks() {
return math_marks;
}
public void setMath_marks(String math_marks) {
this.math_marks = math_marks;
}
public String getEng_marks() {
return eng_marks;
}
public void setEng_marks(String eng_marks) {
this.eng_marks = eng_marks;
}

}


The  Second Class is Main to execute the Code :-


public class Main4
{
// static Student st;
public static void main(String[] args)
{
Student  st= new Student("","","","",0,0,0,0,0);
    Scanner scn = new Scanner(System.in);
st.setFirst_name(scn.next());
st.setFather_name(scn.next());
st.setAddress(scn.next());
st.setChem_marks(scn.nextInt());
st.setPhy_marks(scn.nextInt());
st.setBio_marks(scn.nextInt());
st.setMath_marks(scn.nextInt());
st.setEng_marks(scn.nextInt());
st.print();


}

}`





Keep Sharing !

Comments

Popular posts from this blog

Technology

Virtual Reality The Next Upcoming Domain in Pakistan is VIRTUAL REALITY and people are making themselves obsessed with it because it takes your imagination to what you are seeing through VR gadget as we know the technology is going to boom in Pakistan through last few years.

Program to Make Canvas in Java For GUI

GRAPHICAL USER INTERFACE : CANVAS CLASS: import javax.swing.*; import java.awt.*; import java.util.List; import java.util.*; /**  * Canvas is a class to allow for simple graphical drawing on a canvas.  * This is a modification of the general purpose Canvas, specially made for  * the BlueJ "shapes" example.   *  * @author: Bruce Quig  * @author: Michael Kšlling (mik)  *  * @version 2011.07.31  */ public class Canvas {     // Note: The implementation of this class (specifically the handling of     // shape identity and colors) is slightly more complex than necessary. This     // is done on purpose to keep the interface and instance fields of the     // shape objects in this project clean and simple for educational purposes.     private static Canvas canvasSingleton;     /**      * Factory method to get t...

Virtual reality

VIRTUAL REALITY: A BLESSING INTRODUCTION At the beginning of 1990s the development in the field of virtual reality became much more stormy and the term Virtual Reality itself became extremely popular. We can hear about Virtual Reality nearly in all sort of media, people use this term very often and they misuse it in many cases  too. The reason is that this new, promising and fascinating technology captures greater interest of people than e.g., computer graphics. The consequence of this state is that nowadays the border between 3D computer graphics and Virtual Reality becomes fuzzy.Virtual reality is the creation of a virtual environment presented to our senses in such a way that we experience it as if we were really there. It has both entertainment and serious uses. The technology is becoming cheaper and more widespread. We can expect to see many more innovative uses for the technology in the future and perhaps a fundamental way in which we communicate and work t...