Hello, I am a noob in Java, and I am stumped with these 2 exercises. These are probably extremely simple for you all, so any kind of help with writing the program would be well-appreciated.
1. Write a program which simulates inflation of a balloon (2-dimensional circular shape starting from the centre of your output console as a one-dimensional point). The balloon should collapse again to a one-dimensional point after hitting the console's boundary. This process should repeat itself a certain number of times. (Top: you can get a flashing effect by randomly changing the value of colour using a random value generator with values between 0 and 225).
2. Write a program based on a number of conditional while-loops which animates a movement of a square with the edge length in pixels entered as a prompted input. The square moves back and forth along a 45-degrees slope (straight line) from the bottom-left corner across the output console.
Note: In both assignments you should be able to control the speed of animation either by changing the delay time or by changing the value of increments/decrements.