Description
For this homework, you will write a program that draws the coordinate system and some geometric shapes on the console screen.
Ask the user to choose one of the following shapes:

Line

Parabola

Circle
If the user chooses to draw a line, ask for the coefficients a and b that define the line on the coordinate system: y = ax + b
Similarly, for the parabola, ask for the coefficients a, b, c to define the parabola: y = ax2 + bx + c
Finally, for the circle, ask for the radius (r) and center (a,b) to define it: (x – a)2 + (y – b)2 = r2
After getting required parameters, draw the coordinate system on the console screen using – and  characters, and draw the geometric shape using * character.
Both x and y values in the coordinate system should range at least in [10,10]. You may draw a bigger coordinate system as it will look clearer. However, make sure that your coordinate system fits in the console screen.
Sample run of the program is as follows:
Which shape would you like to draw?

Line

Parabola

Circle

Exit
1
Line formula is y = ax + b
Please enter coefficients a and b:1 3
* 
* 
* 
* 
* 
*
*
*
 *
———–*——x
 *
 *
 *
 *
 *
 *
 *
 *



Which shape would you like to draw?

Line

Parabola

Circle

Exit
3
Circle formula is (xa)^2 + (yb)^2 = r^2
Please enter center’s coordinates (a,b) and radius:3 4 5



y

*
*
*
*
*


* 
*


*
*


———*—–*—x
 *










Which shape would you like to draw?

Line

Parabola

Circle

Exit
2
Parabola formula is y = ax^2 + bx + c Please enter coefficients a, b and c:1 6 2
y
* *






* *

——————x


* *


 * *
 *




Which shape would you like to draw?

Line

Parabola

Circle

Exit
4
Important Notes:

Your program will be tested with an autograder. So it should take the input exactly the same in the example and it should print the output exactly the same in the example. Otherwise, your program may fail.

Your program should execute correctly for different test cases.

Please do not write any package name at the beginning of your code!

Send your questions to your TA, Zuhal Altuntaş (zuhal.altuntas@marmara.edu.tr).
Please zip and submit all your files using the filename YourNumberHW3.zip (ex: 150713852HW3.zip) to the Canvas system (under the Assignments tab). Your zip file should contain the followings:

Java source code (HW3_150713852.java)

Java class file (HW3_150713852.class)
Notes:

Write a comment at the beginning of each program to explain the purpose of the program. Write your name and student ID as a comment. Include necessary comments to explain your actions. Comments are very important for this homework.

Select meaningful names for your variables.

You are allowed to use the materials that you have learned in lectures & labs.

Do not use the things that you did not learn in the course.

Each student should submit his/her own homework. You can discuss with your peers about the homework but you are not allowed to exchange code or pseudocode. This also applies to material found on the web. Should some submitted homework assignments be identical or suspected to be identical, all involved parties will get a grade of ZERO from all homework. In case of any forms of cheating or copying, both giver and receiver are equally culpable and suffer equal penalties.

No late submission will be accepted.