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

  Create an application with a jframe and five labels

Create an application with a "JFrame" and five labels that contain the names of five friends. Every time the user clicks a "JButton", remove one of the labels and add a different one. Save the file ass JDisappearingFriends.java

  Creates an array with x randomly generted integer elements

Write a program DuplicateTester.java that prompts user for a posi- tive integer x and creates an array with x randomly generted integer ele- ments in range 0 to 9. Use a method with signature public static int[] removeDuplicates(int[] array); to remo..

  Draw a uml diagram of each of the shapes

Draw a UML diagram of each of the Shapes, Rectangle and Square classes using the code that has been provided. Complete this using the examples that have been provide in the lecture slides.

  What is localization and why add it to your app

Is Google Cloud Messaging the best approach to use for push notifications? What is localization and why add it to your app?

  Create a complete java application that meets these

create a complete java application that meets these requirements1. the program has an opening comments section using

  Explain the process of initializing an object

Which method is invoked in a particular class when a method definition is overridden in several classes that are part of an inheritance hierarchy

  Write a java program to read sequences of integers from a

write a java program to read sequences of integers from a text file build a binary search tree for each sequence by

  Program that allows a user to input coordinates

In Java make a program that allows a user to input coordinates as to make a Hexagon via an array, and my professor has set the standards of: Write a class Polygon which draws a hexagon for a set of numbers given by the user.

  Program buttons that implements a window with three button

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter

  Write program in java for total amount of customer-s order

Write down program in Java which would ask for clerk to enter total amount of customer's order. Program will then compute seven percent (7%) sales tax.

  Use of arrays with a programming language

Use different program control statements in a programming language - Demonstrate the use of arrays with a programming language and Define and work with classes and objects in a programming language.

  Program to computerize the billing system of a hospital

Design the class doctorType, inherited from the class personType, with an additional data member to store a doctor's specialty.

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