Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I alredy posted and get answered by chegg expert, but he didnt included comment for the code. So I have hard time to understand it.

I alredy posted and get answered by chegg expert, but he didnt included comment for the code. So I have hard time to understand it. Can you pleas make comments on this java code. I want to make javadoc for this code. Thanks image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Pleas use java language and also I included the Polnt class constructor and passes a ets the data folkd data lo the value passed oeject is made then you can update the data field to he value .RCCERRgc aher the object is made then you can teing. s.methed ater the object is 200000000. Note: This hash made you can retrieve the hash code of the object. code ovemdes the hash code of the object class pblic int hashCode t) Create a cient program called Generioclient that has the ability to make a Generie object of type Point, Stzing and Double and wrile methods that will allow you to print out their contents as a string and hash code a Point (2, 6)-Use your Point class from Lab 1 b Sting I am a String that uses the Generic class. . Double: 6.08 package plane;

A point representing a location (x, y) in coordinate space specified in integer precision. public class Point ( *, data fields * stores the (x, y) location of point private int x; private int y constructs and initializes a point at the origin (0,0) of the coordinate plane. * public Pointo this(0,0); calls constructor Pointint, int) constructs and initializes the point to the location specified * by point p. ' @param p reference to the specified point object public Point(Point p) setlocation(p): Il reduce redundancy with setLocation constructs and initializes the point to the specified (x.y) * location. @param x the x coordinate of point to construct. @param y the y coordinate of point to construct. public Point(int x, int y) ( setLocation( y)i reduce redundancy with setlocation returns the x coordinate of the point in integer precision. @returm x the x coordinate of point object . public int getxo ( retum x *returns the y coordinate of the point in integer precision. @return y the y coordinate of point object public int getyo ( return y " moves the point to the specified location in the (x, y) coordinate *plane. This method is identical to setLocation(int, int). @param x the specified x coordinate value. @param y the specified y coordinate value. public void move(int x, int y) this.x x this.y y changes the location of the point in the coordinate plane to the location specified by point p. @param p the specified point public void setLocation(Point p) x p.x; changes the location of the point in the coordinate plane to the location specified by the values (x y). "@param x the specified x coordinate value. " @param y the specified y coordinate value. public void setLocation(int x, int y) ( public class GenericClent public static void main(StringD args) ( TODO Auto-generated method stub Point p new Point(2,6 Generic gString new Generic('I am a String that uses Generic class'): System.out.printin gString+ +gString.hashCodeO) Generic gDouble new Generic(6.08); System.outprintin(gDouble+ "+gString.hashCode0) See Output 368 public static void mai(String args) t 37 //T000 Auto-generated method stub 38 39 40 41 42 Generic Strinp gString new GenerictripI aa String that uses Generic class') 43 Point p- new Point(2,6); Generic Poinbg new GenericPoinb (p); System.out.printlng+g.hashCodeO) System.out.printlngString"String.hashCodeO); Genericdouble gouble new Generic G eric a Applcatinl Libay!Java Java irtualila hi sdk 1.8 O_181/dk Con entshone bin a (2, 6) 865113945 I an a String that uses Generic class 285113192 6.88 2885113192 CO2-Feb-2019 1 Thanks Hide comments(t) V Anonymous posted 17 hours ago Edit Delete Can pleas included comment on the code, so i can have better understanding of the code? Loove a comment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

ISBN: B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

2. Do the same for your favorite female film character.

Answered: 1 week ago