Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-30-2007, 03:59 PM
Member
 
Join Date: Oct 2007
Posts: 1
Android is on a distinguished road
I need help getting started
so here is my assignment, but the instructor never went over this material in class and I'm having trouble grasping the material.

Design and implement an algorithm that deals with abstract data types (ADT) in JAVA. Create Sphere ADT. Write the following software modules or functions:
-Define the class Sphere
-Define two constructors, default and copy
-Construct a few Spheres using default and copy constructors
-Read Spheres from the standard Input device using the Scanner utility.
-Design, run, and test a driver routine (main method in a separate file)that will check the execution of the ADT and its components.

I'd just like some help getting started maybe, or a better explaination of default and copy constructors and how to use them. Thanks in advance for your help.

Last edited by Android : 10-30-2007 at 04:21 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-30-2007, 05:14 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
I guess with "copy constructor, your instructor means a constructor which takes an instance of that class and copy its properties into the new object it creates.

Try to write your own class and then we can check it.. That way you will learn better i guess.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-30-2007, 05:46 PM
Member
 
Join Date: Oct 2007
Posts: 1
maxisms is on a distinguished road
i guess it means overloading constructors
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get started? programmer-in-training New To Java 4 01-11-2008 08:45 AM
Getting Started Doorsmaniac Java Applets 0 11-24-2007 04:40 AM


All times are GMT +3. The time now is 05:51 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org