adapting java api classes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: adapting java api classes

  1. #1
    Join Date
    Sep 2005
    Posts
    11

    adapting java api classes

    a) Implement a subclass Square that extends the Rectangle class. In the constructor accept the x and y positions of the centre and the side length of the square. (Use the setLocation and setSize methods of the Rectangle class from the Java API).
    b) Supply a method getArea that computes and returns the area of the square.
    c) Write a test harness that creates a new Square object and then prints out its details using the toString method that has been inherited from the Retangle class.
    d) Also print out the area of the Square.

  2. #2
    Join Date
    Aug 2005
    Posts
    23
    Hi Mrnewbie,

    The specifications look good, what do you want us to do for you now? We would be glad to see your progress on this assignment and help you if you have an issues.

    --------------
    Naveen Vooka
    www.devsquare.com
    DevSquare - Online Application Development

Similar Threads

  1. Replies: 2
    Last Post: 06-14-2006, 04:16 PM
  2. Java vs. .Net. A questionnaire
    By Basil in forum .NET
    Replies: 1
    Last Post: 05-13-2005, 07:46 AM
  3. API VB and JAVA
    By Mr. Spock in forum VB Classic
    Replies: 0
    Last Post: 08-24-2000, 01:34 PM
  4. Replies: 0
    Last Post: 05-16-2000, 07:42 PM
  5. Best Java Development environment
    By H. Wilson in forum Java
    Replies: 6
    Last Post: 04-14-2000, 12:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center