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
Mariana [72]
3 years ago
6

Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the print member method and a separate println statem

ent to output courseStudents's data. Sample output from the given program:
Name: Smith, Age: 20, ID: 9999
___________________________________________
// ===== Code from file PersonData.java =====
public class PersonData {
private int ageYears;
private String lastName;
public void setName(String userName) {
lastName = userName;
return;
}
public void setAge(int numYears) {
ageYears = numYears;
return;
}
// Other parts omitted
public void printAll() {
System.out.print("Name: " + lastName);
System.out.print(", Age: " + ageYears);
return;
}
}
// ===== end =====
// ===== Code from file StudentData.java =====
public class StudentData extends PersonData {
private int idNum;
public void setID(int studentId) {
idNum = studentId;
return;
}
public int getID() {
return idNum;
}
}
// ===== end =====
// ===== Code from file StudentDerivationFromPerson.java =====
public class StudentDerivationFromPerson {
public static void main (String [] args) {
StudentData courseStudent = new StudentData();

/* Your solution goes here */

return;
}
}
// ===== end =====
Computers and Technology
1 answer:
antiseptic1488 [7]3 years ago
6 0

Answer:

courseStudent.setName("Smith");

courseStudent.setAge(20);

courseStudent.setID(9999);

courseStudent.printAll();

System.out.print(", Id: " + courseStudent.getID());

Explanation:

This is the part of the code that needs to be added in order to print the output same as mentioned in the question. These lines should be added in the main method where solution is asked.

You might be interested in
Enterprise software is designed for organizations to __________.
klemol [59]

Answer:

The goal of enterprise software is to enable the activities of large organizations, supporting a wide range of different user roles.

6 0
2 years ago
It is a life long skills like spelling, it is a skill of typing data currently and quickly using a computer keyboard
viva [34]
Is this a riddle bro?
6 0
3 years ago
Which of the following is a definition of a conventions
laiz [17]
Need more information
6 0
4 years ago
Read 2 more answers
A relative path name defines a path from_________________________ Select one: a. from the UFD (user file directory) b. the curre
lorasvet [3.4K]

Answer:

(b)  the current directory

Explanation:

A path is the location or route to a particular file or folder in an operating system. This path is always unique and can either be relative or absolute.

A relative path name of a file defines the path to the file from the current or present working directory.

An absolute path name of a file defines the path to the file from the root directory. This path gives a complete descriptive path to a file from the start of the actual file system of the operating system.

4 0
3 years ago
Dress4Win has asked you to recommend machine types they should deploy their application servers to.
tensa zangetsu [6.8K]

Answer:

Option A is the correct option.

Explanation:

Because Dress4Win is the online web organization that asked to the consultant to advice that type of machines that they want to expand their server for those application which perform the work of the mapping on the basis of the premises physical hardware cores and also in the clouds softwares that is nearest machines types of RAM.

7 0
3 years ago
Other questions:
  • What output will the look up formula below produce in relation to the following table?
    11·1 answer
  • ________ is the presentation of information to the user and the acceptance of the user’s commands. a.data storageb.data access l
    7·1 answer
  • 5. The hazardous component in most antifreeze is _____, which is extremely toxic to humans and animals. A) Calcium Carbonate B)
    13·2 answers
  • The background image does not affect any cell’s format or content. _______
    5·1 answer
  • Write a program to enter a number and test if it is greater than 45.6.if the number entered is greater than 45.6 the program nee
    13·1 answer
  • Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other clas
    10·2 answers
  • HAIIIIIII ANYONE FEELING JOLLY OR SAD
    9·2 answers
  • What are the missing words in the program?<br> divide(numA,numB):<br> numA/numB
    9·2 answers
  • Write a Python program called wdcount.py which uses a dictionary to count the number of occurrences of each word (ignoring case)
    10·1 answer
  • What is the name for the base-2 system used by computers to represent
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!