• 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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

*/
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it will not run
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
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

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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I sorry to bother you. I am lost, thank you anyhow.
 
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

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
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic