Results 1 to 3 of 3
  1. #1
    Android is offline Member
    Join Date
    Oct 2007
    Rep Power

    Default 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 03:21 PM.

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Rep Power


    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.

  3. #3
    maxisms is offline Member
    Join Date
    Oct 2007
    Rep Power

Similar Threads

  1. How do I get started?
    By programmer-in-training in forum New To Java
    Replies: 4
    Last Post: 01-11-2008, 07:45 AM
  2. Getting Started
    By Doorsmaniac in forum Java Applets
    Replies: 0
    Last Post: 11-24-2007, 03:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts