Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with homework

 
christian kaden
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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






 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Henry Wong
author
Marshal
Pie
Posts: 20995
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Pie
Posts: 20995
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Pie
Posts: 20995
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • 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?


 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • 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
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
Sharmistha Sarkar
Ranch Hand
Posts: 50
1
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic