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

how to create a class called Box... HELP!

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Design and implement a class called Box that contains instance data that represents the height, width and depth of the box. Also include a boolean variable called full as instance data that represents if the box is full or not. Define the Box constructor to accept and initialize the height, width and depth of the box. Each newly created Box is empty (the constructor should initialize full to false). Include getter and setter methods for all instance data. Include a toString method that returns a one-line description of the box. Create a driver class called BoxTest, whose main method instantiates and updates several Box objects.
Thanks a lot,
Patrick
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic