• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with homework

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I need help with running the code in a superclass named Doctor and 2 subclasses named FamilyDoctor and Surgeon






 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
christian kaden
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
christian kaden
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?


 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is normal for the command line to show no output at all for code which compiled correctly.
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 50
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic