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
Tor F: Deleting cell data is the same as clearing the contents of a cell.
Valentin [98]

Answer:

no it is not

Explanation:

it's not because of the cells in side the chip for the data that comes from the cell phone

4 0
3 years ago
Write a program that asks the user to enter a number of seconds and then printsthe same amount of time in days, hours, minutes,
MariettaO [177]

Answer:3363 seconds

Explanation:3363 is equivalent to 0days 1 hour, 1 min, and 7 sec

8 0
3 years ago
John was teaching his students about the basics of computer hardware and software. By the end of his lecture, he asked his class
vredina [299]
A CPU is the electronic circuitry within a computer that carries out the instructions of a computer program by performing basic arithmetic logical, control and input/output operations specified by the instructions.
Knowing this, the answer is both C - That it coordinates the flow of instructions and data within computers, And A - That a control unit performs arithmetical and logical computations.
If you can only select one answer, I'd personally go with A.
4 0
3 years ago
Read 2 more answers
Zachary was frustrated. His computer was running very slowly and he was worried that it was reducing his productivity on the job
Irina18 [472]

Literally QuickTime....I hate brainly

4 0
3 years ago
How do you send freind requests
AysviL [449]
Can you be specific what do you want to send a friend request on? because just saying how do i send friend request is not specific>
<span><span>
</span></span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • "Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag
    11·1 answer
  • What is a recent technological breakthrough with an impact that can be compared to the invention of paper nearly 2,000 years ago
    8·1 answer
  • Match these items. 1 . Naturalization Act stated that a foreigner had to live in the United States fourteen years to become a ci
    5·1 answer
  • Explain briefly the purpose of the Computer Management Console in Microsoft Windows.
    12·1 answer
  • If your vehicle leaves the pavement for any reason, remember to take your foot off the gas pedal, hold the wheel firmly, and____
    8·2 answers
  • Leo noticed that attackers have breached his wireless network. They seem to have used a brute-force attack on the WiFi protected
    13·1 answer
  • Q. Which protocol would best serve to authorize users to access directory services?
    8·1 answer
  • Choose all that apply.
    11·1 answer
  • write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption
    9·1 answer
  • A column does not consist of
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!