Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Special instruction for it: We need to create our own method for Clone method, rather than Clone interface. So please don't use clone interface. Thank

Special instruction for it:
We need to create our own method for Clone method, rather than Clone interface. So please don't use clone interface.
Thank you! image text in transcribed
image text in transcribed
image text in transcribed
CS 251 Lab Exercise 02 Main toe Writing Classes Declaring /Using Instance Variables Writing Instance Methode Access and Muttons publics private Exercise The dewe will be enticing writing a clam from scratch which includes the standard.com and methods. In addition careful attention to the public and private specifiers will be made Started to start this ver, you should lied art anew Java project named Laboa Cramed Circle) to this project, You will be creating the contents of this class from dels (named Circhebriver) to this project, and copy the contents of the Circlabriver del to it. N Requirements san jawa Amples which modela crde by its one defining characterit, which bi radio Your Circle us there to the following LA wables must be printe 2. Os creational Circles have a radim of 1, and their radius is never allowed to become negative. 2. Include the standard public of) Include the Mandard pemutator(s) All constance data by the other instance methodo la made via the cms and contains & Costin a thod veld resize(double stadiun) which allows a client of clow the Clede objetos 1. Contain a method Circle cloon which creates and return a reerence of Clecke object Colethod bolem quale (circle post) which returns what the radim u the calling Circle object .. Contiebed vold pristalich diuplays the calling Circle object's radius to werpos format 10 Los y compilationer I be that this, there a no Circle Deiver je Adrier de to let the Circle clans, provided for you. Theo Ili search RI 2. Run your driver class and check the output and make sure it is correct Once you have completed the requirements: 1. Make sure that your program runs without errors or warning 2. Run your program enough times to verify its correctnes. 2. If it runs correctly, then we your TA for a check-off oss Circle river putie state void main(string] args) scanner stdin new Scanner(System.in); Circle big new Circle(); circle all new cireto(); Bystem.out.println(""); System.out.print(" "); sig.print(); Systen.out.println(""); System.out.print("alt") wall.print(); System.out.println(" "); double blokadius: System.out.print("Enter the radius of big circle: "); bigRadius stdin.nextDouble(); big.resize(bigkadius); double sallRadius; System.out.print("Enter the radius of all circle ") alladius = stdin.nextDouble(); wall.resize(waltRadius); System.out.println(); System.out.print(1); big.print(); System.out.println(""); System.out.print("Small : "); saatl.print(); System.out.println(); it(uig.equals(snius System.out.println(" big equals small ) System.out.println(" big does not equals call) System.out.println(**); Ili Circle icopy bio.clone(); System.out.print("scopy ) ey-print(); rites out.printing is(big) tout.print bigcopy equats bio) System.out.printlnt bycopy do not equals to ")

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

How To Make A Database In Historical Studies

Authors: Tiago Luis Gil

1st Edition

3030782409, 978-3030782405

More Books

Students also viewed these Databases questions

Question

1.The difference between climate and weather?

Answered: 1 week ago

Question

1. What is Fog ?

Answered: 1 week ago

Question

How water vapour forms ?

Answered: 1 week ago

Question

What is Entrepreneur?

Answered: 1 week ago

Question

Which period is known as the chalolithic age ?

Answered: 1 week ago