Print member method and a separate println statement

Assignment Help JAVA Programming
Reference no: EM131578933

Assign courseStudent's name with Smith, age with 20, and ID with 9999.

Use the print member method and a separate println statement 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 =====

Reference no: EM131578933

Questions Cloud

What would happen to the value : What would happen to the value of the 10-year bond over time if the required rate of return remained at 13 percent, or if it remained at 7 percent?
What is its relationship to issues of victims : What is meant by rape culture, what are its characteristics, and what is its relationship to issues of victims and victimization
Define a method printall : Define a method printAll() for class PetData that prints output as follows. Hint: Make use of the base class' printAll() method
Describe the software technology that you will need to build : Describe the software technology that you will need to build your e-commerce site. Why did you choose this particular software?
Print member method and a separate println statement : Use the print member method and a separate println statement to output courseStudentss data -
Find the number of edges in a graph : Is there a relationship between the number of edges in a graph and the degrees of the vertices? If so, find it. Hint: computing degrees of vertices and number.
Lottery commission uses a discount rate : Or, you can take a lump sum payment today. If the lottery commission uses a discount rate of 11.17% APR, how much would you expect to receive today?
Discuss violent video games lead to criminal behavior : Let's say the study concludes that boys who play violent video games behave more violently after the experiment
What are the benefits and drawbacks of buying tips : Please explain the relationship between TIPS and the consumer price index. What are the benefits and drawbacks of buying TIPS?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd