Dr Nick

(4)

$14/per page/Negotiable

About Dr Nick

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Art & Design,Computer Science See all
Art & Design,Computer Science,Engineering,Information Systems,Programming Hide all
Teaching Since: May 2017
Last Sign in: 339 Weeks Ago, 6 Days Ago
Questions Answered: 19234
Tutorials Posted: 19224

Education

  • MBA (IT), PHD
    Kaplan University
    Apr-2009 - Mar-2014

Experience

  • Professor
    University of Santo Tomas
    Aug-2006 - Present

Category > Programming Posted 02 Aug 2017 My Price 13.00

String method for this class

Define a class Point with a constructor public Point(double x, double y) and accessor methods getX,getY. Design and implement a toString method for this class. 

Define an abstract class shape with an instance variable of class Point, a constructor, a concrete method public void moeveBy(double dx, double dy) that moves the point by the given amount, and an abstract method public Point getCenter().Provide concrete subclasses Circle,Rectangle.Line,Square with constructors public Circle(Point center, double radius),public Rectangle(Point topLeft,double width, double height), public square(point topLeft, double side) and public Line(Point from, Point to). For each subclass, implement getCenter and toString(), which will print all details fo the shape plus  the coordinates of its center point.

Supply a tester class called TestShapes that implements aPoint, and an array of Shape and insert into the array, one of each kind of shape subclass. Use a loop to call the toString method of each shape in the array. Now use a llop to ask the user for the coordinates fo a point and move each shape in the array by a different amount, next use a loop to print out the polymorphic array.

Answers

(4)
Status NEW Posted 02 Aug 2017 01:08 PM My Price 13.00

----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------amÂ----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------

Not Rated(0)