• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help  RSS feed

 
Justo Rivera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
package encouragements;
public class PsalmC23V1{
protected String verse = "The Lord is my Shepherd, I shall not want.";
}

/* ----- Homework Questions -----

1. Without changing anything in this package, create a java program that imports the package and extends the PsalmC23V1 class to print out the contents of the protected verse variable to the screen.

*/
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Where is your code? What problems are you having with it?
 
Justo Rivera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is the code iwas given, with a question underneath
 
Justo Rivera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it will not run
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course not, that's the "Create a Java program" part of the assignment. You're supposed to write some code that uses the supplied class.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justo Rivera wrote:it will not run


Of course, not. The part that runs is the part that you are supposed to write...

Justo Rivera wrote:/* ----- Homework Questions -----

1. Without changing anything in this package, create a java program that imports the package and extends the PsalmC23V1 class to print out the contents of the protected verse variable to the screen.

*/



So, what part of the homework assignment have you done so far? We can't give you a hint in the right direction, if you don't show us what you have done.

[edit: darn. beaten by less than 30 seconds]

Henry
 
Justo Rivera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sorry to bother you. I am lost, thank you anyhow.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justo Rivera wrote:I sorry to bother you. I am lost, thank you anyhow.



Assuming that you haven't done anything.... how do you start?


create a java program that imports the package and extends the PsalmC23V1 class to print out the contents of the protected verse variable to the screen.



The first four words are "create a java program". Do you know how to create a basic skeleton program? If not, maybe it would be best to look through your class notes -- is there anything that shows you how to do this first step?

Henry
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't this the same assignment?

Edit: Sorry for the typo, I was writing a reply on the phone. The link should be working now.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!