1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Veseljchak [2.6K]
3 years ago
9

Write a Student class in Java which has a name, id_number, year (e.g. 2) and

Computers and Technology
1 answer:
Fittoniya [83]3 years ago
8 0

Answer:

Following are the code in java

public class Student

{

// member variables

String name;

String id_number;

int year ;

String programme_code ;

// default constructor

public student()  //default constructor

{

name="san";

id_number="12";

year =2010;

programme_code="ECE";

}  

 // method to display the member variables of the Student

 public void display() // dispaly the value

{

System.out.println("Name is  : "+name);

System.out.println("ID is  : "+id_number);

System.out.println("Year is  : "+year);

System.out.println("Programme code is : "+programme_code);

  }

public static void main (String[] args) // Main method

{

 Student ob=new Student();

 ob.display(); // calling the method display  

}  

}

Explanation:

In this we create a class "student "  name,id_number, year and  programme_code are the variable after that create a default constructor and initialize the variable and finally display the variable .In the main method we create a object of student class i.e ob ,and call display method  with object ob.

Output:

Name is  :san

ID is  : 12

Year is  :2010

Programme code is : ECE

You might be interested in
Which of the following can computer maintenance software determine?
Softa [21]

Answer:

A

Explanation:

Becuase i picked that and i git it right

7 0
3 years ago
A section at the top of the page that makes it easy for the recipient to respond to a letter is called a(n
Umnica [9.8K]

Answer:

Address block.

Explanation:

7 0
3 years ago
What is the purpose of installing updates on your computer?
Lostsunrise [7]

The purpose of adding updates to your computer are as follows:

  • Making sure your computer hardware can run the newest software programs
  • Ensuring the built-in virus protection software is up to date
  • Removing bugs and glitches from your operating system
  • Allowing your computer to run as fast as possible
4 0
2 years ago
HELP!!!
aleksley [76]

Answer:

The detail answer of this question is given in explanation section.

The simple answer is option B

Explanation:

Let took at each option:

A) an html tag

An html tag is used to start and end html document. It does not have anything to do with rendering.

B) a doctype declaration

The document type declaration is necessary because it tell the browser which version of html should be rendered.

C)Body tag tell the browser. it is the visible area of website.

D) A hear tag is used to clear meta data about website.

3 0
2 years ago
Read 2 more answers
A.<br>Define a computer with its proper meaning.​
Rashid [163]

Answer:

Computer

Explanation:

a programmable electronic device designed to accept data, perform prescribed mathematical and logical operations at high speed, and display the results of these operations.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Marginal ________ shows how much money can be made if a producer sells one additional unit of a good.
    7·2 answers
  • Cognitive psychology is the scientific study of what
    9·1 answer
  • This is not a feature provided by most GUIS.<br> icons<br> windows<br> forms<br> menus
    14·2 answers
  • (2) Design pseudocode for a program that accepts numbers from the user until the special number 555 is entered (you should use a
    12·1 answer
  • Midday is a good time to take a portrait outside.<br> true or false?
    8·1 answer
  • Which best describes how a supporting database will be structured?
    10·1 answer
  • Write a Java program that will be able to generate the sample table below.
    5·1 answer
  • Difine Mainframe Computer~<br><br><br><br><br><br><br><img src="https://tex.z-dn.net/?f=%20%5C%3A%20%20%5C%3A%20" id="TexFormula
    12·2 answers
  • When James added a date field to a PivotTable, Excel grouped the date values into quarters, months, and years. He does not want
    13·1 answer
  • Suppose your team is finishing a project and the supervisor stresses ensuring the material cannot be erased. To what memory leve
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!