Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 9 Weeks Ago, 4 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I'm having a hard time with this problem, I just can't get the start of the code.
Â
© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 2 CirclesLab 2 CirclesPurposeThe purpose of this lab is for you to practice material covered during Weeks 4 and 5, andLab 1 Cars.Problem specificationTheCircleclass represents circles.A circle has a color (e.g. "red", "blue", "yellow"),and a radius.SeparateCirclemethods must return the color, calculate and return thecircumference, and calculate and return the area.TheCircleTesterclass uses theCircleclass, gets user input to create a new circle anddoes calculations on it.TheCircleclassHere is a partial pseudocode outline ofCircle:constantsset PI to 3.1415926instance variablesas specified abovemethodsconstructor(radius parameter, color parameter)initialize all instance variablesdesign other methods, parameters and return types as specified above(IMPORTANT NOTE:none of theCirclemethods print anything out.Instead, all of them return a value back to the method calls inCircleTester)(algorithm for circumference is 2πr)(algorithm for area is πrr)TheCircleTesterclassPut allCircleTestercode into themain()method.Declare inmain()any localvariables that are needed.Here is a pseudocode outline:instance variablesnone
Attachments:-----------