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
PLEASE HURRY PLEASE HELP THIS CLASS ENDS TODAY AND I NEED HELP
Fofino [41]

Answer:

She could have given access to the computer to the techician

Explanation:

"as well as any special settings or configurations she thinks may be relevant." This might inculd any information to hack the computer

6 0
3 years ago
An object completes one round of circle of radius 7m in 20 sec. Distance travelled after 10 sec is? ​
Ivanshal [37]

Answer:

distance \: travelled \:  = 2\pi \\  \\ 44cm \:  \:  \:  \:  \\ speed \:  =  \frac{44}{2.2}  \ \\ distance \: travelled \: in \: los = 10 \times 2.2 = 22cm \\  \\ total \: distance = 44 + 22 = 66metres

5 0
3 years ago
8.10 LAB: Convert to binary - functions Write a program that takes in a positive integer as input, and outputs a string of 1's a
Korvikt [17]

Answer:

// This program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

#include <string>

using namespace std;

// Declare variables

int inputvar;

// Declare output variable as array

int outputvar[32];

// Set a counter for binary array

int i = 0;

while (inputvar > 0) {

// Divide inputvar by 2 and store remainder in outputvar

outputvar[i] = n % 2;

inputvar/=2;

i++; // increment i by 1

}

// End of division

// Prin resulting array in reverse order

for (int j = i - 1; j >= 0; j--) {

cout << outputvar[j];

}

return 0;

}

// End of Program

3 0
4 years ago
Which of the following Federal labor laws apply to
Allisa [31]

We can actually deduce here that the following Federal labor laws apply to workers under 18:

  • Federal Minimum Wage
  • Equal Employment Opportunity
  • Occupational Safety and Health
  • Child Labor Laws.

<h3>What is employment?</h3>

Employment is actually known as the process of hiring someone for a particular job and compensating them in return in form of salaries, wages, or royalties.

In the United States, the Fair Labor Standards Act (FLSA) has set out certain standards of employment for persons under 18. It has set standards that will enable people under 18 enjoy better working conditions. Such standards are found in federal minimum wage, equal employment opportunity, occupational safety and health and child labor laws.

Learn more about employment on brainly.com/question/1991900

#SPJ1

4 0
2 years ago
Read 2 more answers
A cyberbully is someone who invades another person’s privacy by
e-lub [12.9K]
Insulting or harassing them over the Internet
8 0
4 years ago
Read 2 more answers
Other questions:
  • Which is a network of devices built around a person, typically within 10 meters of range?
    5·1 answer
  • The __________ determines whether coolant should be pumped back into the engine directly or cooled first.
    15·1 answer
  • Juan is interested in getting a job in the technological field. He is interested in protecting data from threats, and stopping h
    9·1 answer
  • what is the ability to carry out financial transactions using mobile devices such as tablets and phones?
    5·1 answer
  • The _device provides a means of communication between a computer and outer world.​
    14·1 answer
  • 2.20 Write an expression involving a three-letter string s that evaluates to a string whose characters are the characters of s i
    6·1 answer
  • Where are super computer mainly used​
    13·2 answers
  • During which phase of the writing process is it best to have other
    11·1 answer
  • My chrome book computer clock is an hour off how do I fix that
    14·1 answer
  • Based on three scores that the user inputs, display the average of the score and the letter grade that is assigned fort he test
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!