Question: java Write a complete class defntion Comple, run, and modfy a mult-cless Java program Use the Java APl documentation to find uselul clasos and methods
Write a complete class defntion Comple, run, and modfy a mult-cless Java program Use the Java APl documentation to find uselul clasos and methods The Goal Atthe endofunt 2. we spent alitletme n ciass on a prograrn todosome String operators In his ecercise. yol endupnthe same place, but instead of just writing a man program, you're gong to design dmolement class that does the The stringPile class To remind you, here's the acivity rorn unit 2 magine a program that reads an arbtrary number of Strings in from the input (whare each ine of inut is treated as a Stringl then outputs: the shortast String (multiplo Strings have the shortest langth output the one real work So the Seeingtile class is going to do most of that work. In partcular, heres the class "skeletion A coupla notos thO i oad o metod takes a scanner rofoonce in partoular, you can pass a scanner that wrape Syrten, 1n you must set tat up beoro you cal leadu. of oorse) You mond implementation should read bon i Scanner smiarty, printr norder wil prt to whatever PrintSt rean objects parameter oetes to in particuar. you can pass n systen. oat, Remember that you are not to implement the sont yoursel, but to use the Java API.Also note that you can delect the end of the input with a Scanner object by using the hasNextLinen method Your Task So, you have three things to do. implement the Str ngP11e cass Noice that there is noting here about mplementation detais Do you feed nstance varables? Do you need to wrte any helper. methods? what exacty should ge load D method do? Another thing to thinkabout: must every 'ger method corsespond to an instance variable? 2 Use your Stringeile class t0 rrplement the exercise Create some tost data and test your applcation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
