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
As an ICT student teacher using convincing and cogent reasons explain why you think operating system is pivotal in teaching and
dalvyx [7]

Answer:

An operating system (OS) is a software which is responsible for the management of computer hardware, software, and also provides common services for computer programs.

Operating System is pivotal in teaching and learning because:

1. It enables computer programs to run smoothly on various computer devices.

2. The Operating System gives teachers the opportunity to install learning apps on their devices for ease of teaching.

3. It enables students to download and install learning applications, download and upload assignments, etc.

4. The Operating System makes video conferencing for online tuition easy and smooth.

5. It makes computer users to interact with other applications and softwares within a device.

Operating systems are found on many computer devices e.g: mobile phones, video games, PCs, supercomputers, etc.

4 0
3 years ago
For hashing to work, it requires that
irinina [24]

Answer:

C. Both of the above

Explanation:

A. because the a main purpose of hashing is to store a lot of information in a string of random letters

B. because it is a form of encryption, though not absolutely impossible to break. That's also why it was worded as: it must be hard to...

6 0
3 years ago
Write a function called is_present that takes in two parameters: an integer and a list of integers (NOTE that the first paramete
Agata [3.3K]

Answer:

The function in python is as follows

def is_present(num,list):

    stat = False

    if num in list:

         stat = True

       

    return bool(stat)

Explanation:

This defines the function

def is_present(num,list):

This initializes a boolean variable to false

    stat = False

If the integer number is present in the list

    if num in list:

This boolean variable is updated to true

         stat = True

This returns true or false        

    return bool(stat)

7 0
3 years ago
More a poster appealing people to be aware <br>against bullying​
Leya [2.2K]

Answer:

Cool

Explanation:

5 0
3 years ago
How to install windows 11 on unsupported processor
alexgriva [62]

Answer: You can't, if you anyway bypass the system, your device will run on risk.

Suggestion: Use any Linux distro similar windows 11. Like - Ubuntu/ Linux Mint/ ElementaryOs.

(Suggestion is only for if you can't run windows 10 or the pre installed Operating System in your machine.)

4 0
3 years ago
Other questions:
  • Which diagrams represent how roles can affect careers and lifestyles
    11·1 answer
  • How have search engines like Google, Bing, and Yahoo! revolutionized the ability to do research? They are more difficult to acce
    15·2 answers
  • IN MICROSOFT EXCEL YOU CAN UES FOMULA TO DIVIDE OR MULTIPLY WHAT IS THE CORRECT FORMULA TO CALCULATE 4*6
    14·1 answer
  • Lucy wants to develop a web page to display her profile. She wants to just start with a basic page that lists her accomplishment
    13·1 answer
  • You have a notebook computer and wish to connect to an IEEE 802.11ac wireless network. The computer does not have a built-in WLA
    15·1 answer
  • It is necessary tto save updates often when working in google docs? True or false
    11·2 answers
  • Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and displays the day of the w
    5·1 answer
  • Use the drop-down menus to complete the statements about Search Folders.
    12·1 answer
  • What type of purchase requisition is used to turn-in a recoverable/reparable material to the ssa?
    13·1 answer
  • in a small town, there are two providers of broadband internet access: a cable company and the phone company. the internet acces
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!