Help needed regarding java assignment at Hilsinki MOOC course via /r/learnprogramming


Help needed regarding java assignment at Hilsinki MOOC course

“` public class Printing {

public static void printStars(int amount) { int counter = 0; while(counter != amount){ System.out.print("*"); counter ++; } System.out.println(""); } public static void printSquare(int sideSize) { int counter = 0; while (counter != sideSize){ counter ++; printStars(sideSize); } } public static void printRectangle(int width, int height) { int counter = 0; while (counter != height){ printStars(width); System.out.println(""); counter ++; } } public static void printTriangle(int size) { } public static void main(String[] args) { // Tests do not use main, yo can write code here freely! // if you have problems with tests, please try out first // here to see that the printout looks correct } 

}

“`

Submitted July 13, 2017 at 06:09AM by dgaa1991
via reddit http://ift.tt/2thwYys

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s