aspose file tools*
The moose likes Beginning Java and the fly likes Help with homework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with homework" Watch "Help with homework" New topic
Author

Help with homework

christian kaden
Greenhorn

Joined: May 01, 2013
Posts: 10
Hello I need help with running the code in a superclass named Doctor and 2 subclasses named FamilyDoctor and Surgeon






fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11498
    
  16

Can you be a bit more specific? Did it compile? Did you try to run it? What happened EXACTLY? If you get an error message, please post the full and complete error.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
christian kaden
Greenhorn

Joined: May 01, 2013
Posts: 10
fred rosenberger wrote:Can you be a bit more specific? Did it compile? Did you try to run it? What happened EXACTLY? If you get an error message, please post the full and complete error.

It does not compile, no errors
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19064
    
  40

christian kaden wrote:
It does not compile, no errors



If there are no error messages, then what do you mean by "it doesn't compile"?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
christian kaden
Greenhorn

Joined: May 01, 2013
Posts: 10
Henry Wong wrote:



If there are no error messages, then what do you mean by "it doesn't compile"?

Henry


It doesn't show anything in the console it when I run it
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19064
    
  40

christian kaden wrote:

It doesn't show anything in the console it when I run it



If it doesn't compile, then how the heck are you able to run it??? Seriously, please tell us exactly what you are doing -- the command themselves. Also, do a "dir" to tell us what files you have, and what directory you are running the commands from.

Henry


christian kaden
Greenhorn

Joined: May 01, 2013
Posts: 10
Henry Wong wrote:
christian kaden wrote:

It doesn't show anything in the console it when I run it



If it doesn't compile, then how the heck are you able to run it??? Seriously, please tell us exactly what you are doing -- the command themselves. Also, do a "dir" to tell us what files you have, and what directory you are running the commands from.

Henry




Its in eclipse. I have 3 files, Doctor.java, FamilyDoctor.java, and Surgeon.java. FamilyDoctor and Surgeon are the subclasses of Doctor. When I click run test, it shows nothing in the console.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19064
    
  40

christian kaden wrote:
Its in eclipse.


First of all, don't use eclipse. Use the command line. Quite frankly, you should be able to know the difference between "compiling" and "running" -- and eclipse seems to be blurring that line for you. It is also likely hiding a ton of stuff that you should be learning.

christian kaden wrote:
I have 3 files, Doctor.java, FamilyDoctor.java, and Surgeon.java. FamilyDoctor and Surgeon are the subclasses of Doctor. When I click run test, it shows nothing in the console.


Okay.... what did you expect to show up on the console?

Henry
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Henry Wong wrote:Okay.... what did you expect to show up on the console?


And why? That is, what specific code in what you provided do you expect to cause the console output you expect?


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
It is normal for the command line to show no output at all for code which compiled correctly.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11498
    
  16

also, if the code in the original post is all you have...it wouldn't do anything. You have no output whatsoever, so if it did actually run, it wouldn't do anything you could see.
Sharmistha Sarkar
Ranch Hand

Joined: Dec 18, 2012
Posts: 44
christian kaden wrote:
I have 3 files, Doctor.java, FamilyDoctor.java, and Surgeon.java. FamilyDoctor and Surgeon are the subclasses of Doctor. When I click run test, it shows nothing in the console.


Can you provide us the .java file from where you are running the application? [the file which has main()]

And please look at the below post too.
fred rosenberger wrote:also, if the code in the original post is all you have...it wouldn't do anything. You have no output whatsoever, so if it did actually run, it wouldn't do anything you could see.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with homework