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]
2 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]2 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
True or false when a host gets an IP address from a DHCP server it is said to be configured manually
anyanavicka [17]

The answer to your question is false

6 0
3 years ago
In a program called Nature's Notebook, citizen volunteers make and report observations about seasonal changes in plants and anim
Alina [70]

Answer:

discovery science .

Explanation:

The discovery in ecology consists of making sustainable observations of creatures within their ecosystem. Though it consist of other things also like people,citizen etc. but the Nature's Notebook program fits the definition of discovery science.So we conclude that discovery science is the best choice for this question.

7 0
2 years ago
Wide area network (WAN) connects multiple networks that are in the same geographical locations.
xeze [42]

Answer:

False.

Explanation:

<em>This is pertaining to LAN or Local Area Network. LAN is a type of network that is consist of one or several networks located in one geographical area or location. Wherein WAN or Wide Area Network is a type of network that is located in different or several geographical area. The basic example of WAN is the Internet. Networks of computers are connected even though they are not wired physically.</em>

5 0
3 years ago
How do computer users benefit from the increased speed?
erma4kov [3.2K]

Answer:

jrjhfn4

Explanation:

jejehrurjrbrr

7 0
2 years ago
What encryption method is used by WPA for wireless networks?
azamat
<span>The WPA protocol implements much of the IEEE 802.11i standard. Specifically, the Temporal Key Integrity Protocol (TKIP) was adopted for WPA. WEP used a 64-bit or 128-bit encryption key that must be manually entered on wireless access points and devices and does not change.</span>
7 0
3 years ago
Other questions:
  • Which of them does not support decision making? Options DSS, GDSS, ESS All of above
    10·1 answer
  • Match each career with the education required for each job
    12·1 answer
  • Assume that an array of integers named a that contains exactly five elements has been declared and initialized. Write a single s
    15·1 answer
  • Explain how the operating system controls the software and hardware on the computer?
    5·1 answer
  • 3. When you right-click a linked spreadsheet object, what commands do you choose to activate the Excel features?
    7·2 answers
  • How do you create multiple columns in Word?
    12·1 answer
  • Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0
    9·1 answer
  • Which element of the MakeCode Arcade interface represents an individual
    12·1 answer
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
  • Create a program that prompts the user for a positive integer then prints a right-aligned pyramid using that number using the st
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!