![Ayomide19](/avatars/29988.jpg)
Ayomide19
26.02.2020 •
Engineering
Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the printAll() member method and a separate println() statement to output courseStudents's data. Sample output from the given program: Name: Smith, Age: 20, ID: 9999
Solved
Show answers
More tips
- F Family and Home Is it Worth Knowing the Gender of Your Child Before Birth?...
- H Health and Medicine Mercury Thermometer Danger: What to do when a thermometer breaks?...
- F Food and Cooking How to cook crayfish? Everything you need to know...
- G Goods and services LED-подсветка в LCD-телевизорах: 5 причин, почему она лучше других технологий...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- G Goods and services Which TV is better - LCD or Plasma?...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- C Computers and Internet Where did torrents.ru move to?...
Answers on questions: Engineering
- E Engineering Many earphones are designed in the way pictured below. A coil of wire carrying an electric current is wrapped around a tiny speaker cone. The cone and coil are placed...
- E English Nthe story “one thousand dollars,” how does the use of a third-person limited point of view create a surprise ending?...
- B Biology What happens to a cell in the s phase?...
- S Social Studies Millennials consists of “” who have grown up with technology....
- C Chemistry How many underwater volcanoes erupt every...
- B Biology What is a factor that affects the outcome of an experiment? a. observation b. statement c. prediction d. variable description...
- S Spanish Question 1 (1 point) question 1 saved select the response that best answers the question. ¿te gusta estudiar? (1 point) question 1 options: 1) sí, me gusta estudiar...
- S SAT How much time do students need to complete the writing and language section of the psat?...
- H Health The skin’s major functions include all but which of the following? a) protection from uv radiation b) prevent absorption of chemicals c)protection from microbes...
- M Mathematics Asap have until 5: 00 today one face of a lamp shade is a trapezoid shape. what is the area of the lamp shade face?...
Ответ:
The solution code is written in Java. Presume that there is a Student class with three private attributes (name, age and ID). Within the Student class, there is a member method, printAll that will display the name, age and ID using the println() method.
Student.java
public class Student { private String name; private int age; private int ID; public Student(String name, int age, int ID){ this.name = name; this.age = age; this.ID = ID; } public void printAll(){ System.out.println("Name: " + this.name); System.out.println("Age: " + this.age); System.out.println("ID: " + this.ID); } }In the main program we create a student instance and use this instance to call the printAll member method to display the output as required by the question.
Main.java
public class Main { public static void main(String[] args) { Student courseStudent = new Student("Smith", 20, 9999); courseStudent.printAll(); } }Ответ:
well that's concerning