Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to be answered correctly. You must: Comment and Format and Must make sure about indenting. If you don't follow these steps, it will be

Need to be answered correctly. You must: Comment and Format and Must make sure about indenting. If you don't follow these steps, it will be flagged for review. MUST BE IN JAVA FORMAT. IT IS A MUST. Please also check the output very carefully.image text in transcribed

Need to be answered correctly. You must: Comment and Format and Must make sure about indenting. If you don't follow these steps, it will be flagged for review. MUST BE IN JAVA FORMAT. IT IS A MUST. Please also check the output very carefully.

This questions had 2 parts. Both parts need to be answered. It is on Methods.

This lab is on Methods Exercise 1. ) Write a program that has a method called drawSquare that will print a square and call the method from the main method. Include one output Sample output: Exercise 1. (ii) Write a program that has a method called drawSquare (int size) that will print a square of an inputted symbol (e.g., # or +) of the given size. In the main method ask the user to enter a size and a symbol and then use these values to call the method from the main method. Include two different outputs showing two different square sizes and input types. Sample output: -jGRASP exec: java Lab8_squaresizes Enter the size: 4 Enter a symbol: # jGRASP: operation complete

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_2

Step: 3

blur-text-image_3

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions