Question: Codes: PlanetTesterV8.java : /***@purpose:TestertocreatetwoPlanetV8objects**@authorAPCSTeam*@versionFLVS2020*/ public class PlanetTesterV8 { public static void main ( String[]args ) {Stringname1= Jupiter ; int diam1= 142984 ;Stringname2= Mars ; int
Codes:
PlanetTesterV8.java :
/***@purpose:TestertocreatetwoPlanetV8objects**@authorAPCSTeam*@versionFLVS2020*/publicclassPlanetTesterV8{publicstaticvoidmain(String[]args){Stringname1="Jupiter";intdiam1=142984;Stringname2="Mars";intdiam2=6794;doubleradius=0.0;PlanetV8spaceA=newPlanetV8(name1);radius=spaceA.calcRadius(diam1);System.out.println("Planet:"+name1+"\tRadius:"+radius);PlanetV8spaceB=newPlanetV8(name2,diam2);radius=spaceB.calcRadius();System.out.println("Planet:"+name2+"\t\tRadius:"+radius);//createathirdPlanetV8object}}
PlanetV8java:
/***@purpose:PlanetV8ObjectClass**@authorAPCSTeam*@versionFLVS2020**/publicclassPlanetV8{privateStringn;privatedoubled;//oneparameterconstructor,allprivateinstancevariablesinitializedpublicPlanetV8(Stringname){n=name;d=0.0;}//twoparameterconstructorpublicPlanetV8(Stringname,doublediam){n=name;d=diam;}publicStringgetName(){returnn;}publicdoublegetDiam(){returnd;}publicvoidsetName(Stringname){n=name;}publicvoidsetDiam(doublediam){d=diam;}publicdoublecalcRadius(){doubleradius=0.0;radius=d/2.0;returnradius;}//overloadedmethodpublicdoublecalcRadius(intd){doubleradius=0.0;radius=d/2.0;returnradius;}}
![Codes: PlanetTesterV8.java : /***@purpose:TestertocreatetwoPlanetV8objects**@authorAPCSTeam*@versionFLVS2020*/publicclassPlanetTesterV8{publicstaticvoidmain(String[]args){Stringname1="Jupiter";intdiam1=142984;Stringname2="Mars";intdiam2=6794;doubleradius=0.0;PlanetV8spaceA=newPlanetV8(name1);radius=spaceA.calcRadius(diam1);System.out.println("Planet:"+name1+"\tRadius:"+radius);PlanetV8spaceB=newPlanetV8(name2,diam2);radius=spaceB.calcRadius();System.out.println("Planet:"+name2+"\t\tRadius:"+radius);//createathirdPlanetV8object}}PlanetV8java: /***@purpose:PlanetV8ObjectClass**@authorAPCSTeam*@versionFLVS2020**/publicclassPlanetV8{privateStringn;privatedoubled;//oneparameterconstructor,allprivateinstancevariablesinitializedpublicPlanetV8(Stringname){n=name;d=0.0;}//twoparameterconstructorpublicPlanetV8(Stringname,doublediam){n=name;d=diam;}publicStringgetName(){returnn;}publicdoublegetDiam(){returnd;}publicvoidsetName(Stringname){n=name;}publicvoidsetDiam(doublediam){d=diam;}publicdoublecalcRadius(){doubleradius=0.0;radius=d/2.0;returnradius;}//overloadedmethodpublicdoublecalcRadius(intd){doubleradius=0.0;radius=d/2.0;returnradius;}} 811212020 AP Computer Science A 05.08 Assignment](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/11/6732e13f2b8b2_7106732e13ef0480.jpg)

811212020 AP Computer Science A 05.08 Assignment Instructions Instructions: Convert your V3 object class from the Default Constructors assignment to V8 implementation and client classes and instantiate multiple objects. :bP-'Nr' 9. 10. Create a 05.08 Assignment project in the Mod05 Assignments folder. Read the instructions carefully before you attempt the assignment. Before you begin coding, use a word processor to create a class diagram. In the 05.08 Assignment project, create a V8 class for your object and a V8Tester class. Use PIanetV8 as a model. Copy any part of your V3 object class you'd like to reuse and paste it into the appropriate class shell you just created. Change any statements that mention V3 to V8. Compile the project to make sure no errors were introduced and run the program to verify that it still works. Fix any errors that show up before moving on to the next step. In the object implementation class, declare private instance variables, define a loaded constructor, and initialize the instance variables. Define at least one overloaded method. Add any methods to your object you'd like. . In the client class, instantiate at least three instances of your V8 object. Invoke the necessary methods to calculate or manipulate data for the objects. Print the results in a user-friendly format. (Hint: use the \\t escape character) Be sure to document each section of the code. Expected Output: When the program runs correctly, the output will resemble the following screen shot. Your output will show results for your objects. https:lt'po.vs.net/educatort'studentfframe_tooIbar.cgi?lweber29*letsalamander'mpos=1&spos=0&option=hidemenu&slt=p0vaAMm8wegM*51TB'ht'tp:... '3 Bind: Terminal Mndw - seams Optbns Student Grade 1 Grade 2 Average John 85 90 8?.5 Allsa 9B 92 91.9 Jessica 92 34 88 . 9 C1 1/2 8/12/2020 AP Computer Science A 05.08 Constructing Multiple Objects Grading Rubric 05.08 Constructing Multiple Objects Grading Rubric Points Points Components Possible Earned Class diagram provided. 2 Comments include name, date, and purpose of program. Project consists of two separate classes in two separate files. Private instance variables declared. Constructor correctly written and initializes private instance variables. Method headers correctly written. Provide one overloaded method. 2 Comments appropriately used for documentation. Multiple objects constructed. Individual methods invoked on an object from main () method. 1 All calculations and data manipulation are accurate. 1 Output formatted using escape characters. No compiler or runtime errors. Thoughtful PMR included. Total 15 https://po.flvs.net/educator/student/frame_toolbar.cgi?|weber29*letsalamander*mpos=1&spos=0&option=hidemenu&sIt=1cGfumDb4CC2A*5178*http://... 1/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
