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
lesantik [10]
3 years ago
8

Write java code to create a new class called "student". an object of the student class has attributes like student id, name and

address. instantiate an object of this class, with these attributes. thereafter, display these attributes to a user.
Computers and Technology
1 answer:
Fiesta28 [93]3 years ago
8 0
Here you go. I added a constructor and a toString overload to make the object creation and printing as easy as possible.

public class student {
    private String _id;
    private String _name;
    private String _address;

    public student(String id, String name, String address) {
        _id = id;
        _name = name;
        _address = address;
    }

    public String toString() {
        return "Id: " + _id + "\nName: " + _name + "\nAddress: "+ _address;
    }

    public static void main(String[] args) {
        student s1 = new student("S12345", "John Doe", "Some street");
        System.out.println(s1);
    }
}

You might be interested in
Write a program that lets the user enter four quarterly sales figures for six divisions of a company. The figures should be stor
NeTakaya

Answer: Buisness calendars

Explanation:

7 0
2 years ago
Which of the following galaxy types is most likely to be clearly identifiable, regardless of orientation? SBc
Reil [10]

Answer:

The most likely galaxy type to be identifiable regardless of orientation is: Irr

Explanation:

The Irr galaxies don't have a discernable or usual shape; that is why it is relatively easy to identify.

When we talk about E type galaxies, this statement proves itself by the way the cumulus of stars compounds the galaxy. The elliptical galaxies have the form of ellipses, with a reasonable distribution of stars. The degree of eccentricity is the number that complements the E letter; that's why E0 galaxies are almost spherical, while E7 is considerably elongated.

SBc, SBa galaxies are spiral; this means it can be flat in some angles difficulting their identification process; in this case, the last letter means the way the arms display their form, with "c" having a vague form and "a" well-defined arms. That's why in some angles can be mistreated as another type of galaxy.

3 0
3 years ago
Which is the best information to determine an athlete's abilities and needed areas of improvement?
katen-ka-za [31]

Answer:

4

Explanation:

7 0
2 years ago
Read 2 more answers
Complete the statement below with the correct term.
nikitadnepr [17]

Answer:

DOMAIN

Explanation:

A utility that provides names to each computer on a network is called a DOMAIN naming service.

4 0
3 years ago
aquatic life zone such as acorans and their bays, estuaries, coastal wetlands, shorelines, coral reffs and mangrove forests?
Oksana_A [137]

Answer:

Iajajkwbwiw whw

Explanation:

Bshsiwiqnqiaowpwownsbbsdk akakwjnwkwnwkwnwoqknanamamalamkakakskwkwkwnwmw.

I hope u liked my answer. Thank u

6 0
3 years ago
Other questions:
  • Unix/linux are ____ systems, which let many people simultaneously access and share the resources of a server computer.
    13·1 answer
  • Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom
    13·1 answer
  • e do loop differs from the while loop in that a. the while loop will always execute the body of the loop at least once b. the do
    9·1 answer
  • Nested if-else structures can contain many blocks of code. How many of those blocks of code might be executed?
    14·1 answer
  • 2.27 LAB: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as
    14·2 answers
  • What is the name of the technology that integrates vast data bases with georeferenced data in order to design, plan, and manage
    5·1 answer
  • Retype and run, note incorrect behavior. Then fix errors in the code, which should print num_stars asterisks.
    9·1 answer
  • Assume user_name equals "Tom" and user_age equals 22. What is printed on the console when the following statement is executed? c
    14·1 answer
  • Help ASAP!!Choose all the basic elements of algorithms. A.Selection B.Loops C.Flow Charts D.Sequencing E.Combinations F.Iteratio
    14·2 answers
  • What tasks should a laptop accomplish?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!