Home Tutorialhelp Comment how to create toString?

 
 

Comment

izah
how to create toString?,
January 30, 2010 at 6:36 AM

How toc create a class named Employee with name and salary. Make a class Manager inherit from Employee with an instance field named department. Supply a method toString() that prints the manager’s name, department and salary. Make another class named Director which inherits from Manager that has an instance field named carAllowanceAmount. Supply the toString() method for Director that prints all of its instance variables. Also, write a program name TestQ3 that instantiates an object of each of these classes and invokes the toString() method of each of these object.
(Note: all instance variables must be assigned with private accessibility and methods with public accessibility)

how to use toString?
View All Comments
Advertisement
Related Tutorial and Articles
Programming Questions

Question-Answer Guidelines
 

Ajax Questions

share your answer to this question
 

Programming Tutorials

Articles - Articles Submission Guidelines
 

JSP Servlet Questions

Plz send me answer quckly
 

JSP Servlet Questions

Please , can any one answer this Question?
 

Programming Questions

Question Answer
 

Java Beginners

Clarify my last question's answer - Java Beginners
 

Java Beginners

to know my answer
 

Java Beginners

question
 

Java Beginners

pls answer these question
 

Java Beginners

how i want to create a coding by this question?
 

JSP Servlet Questions

hi,i'am new to Jsp.Can some one please let me know an answer for this question?
 

Java Beginners

i cNT GET ANSWER FOR THIS QUESTION
 

Java Interview Questions

java interview question and answer - Java Interview Questions
 

JSP Servlet Questions

send answer
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Java Beginners

java.please answer this...
 

Java Tips and Examples

Programming Style Guideline
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Java Beginners

java related question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Swing AWT

How to create form in Swings
 

Java Beginners

Java experts.Please answer this question - Java Beginners
 

General

Constructor Chaining Answer
 

Java Beginners

Question
 

JSP Servlet Questions

Urgent Answer Req
 

Java Beginners

question
 

Java Beginners

What is the answer and how the program work?
 

JSP Servlet Questions

jsp question
 

JSP Servlet Questions

jsp question
 

Java Beginners

please answer me
 

Java Beginners

question
 

Java Beginners

Question?
 

HTML Questions

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

JSP Servlet Questions

Question
 

JSP Servlet Questions

Question
 

Ajax Questions

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

JavaScript Questions

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Hibernate Questions

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

HTML Questions

html question
 

SQL Question

basic question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

JDBC Questions

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

Java Beginners

question
 

JDBC Questions

Question
 

Java Magazine Questions

Question in Create Arraylist ?
 

Java Beginners

question
 

JSP Interview Questions

question
 

Java Beginners

i need to answer this Question but i can't do it probably
 

Java Beginners

question
 

JSP Servlet Questions

s per ur answer
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Java Beginners

Plz answer - Java Beginners
 

HTML Questions

how to get following answer in turbo c program
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Servlet Interview Questions

java question
 

Regex Questions

answer
 

Programming Tutorials

Core Java Interview Question, Interview Question
 

Advertisements Advertisements
 

 

 

DMCA.com