For you homework, code the solution to problem E1.10 (the one about printing a house) from https://www.lol-101.com/classrooms/introduction-to-java/1-3-how-to-expand-my-first-program and comment your solution to this post.
class Main { public static void main(String[] args) { System.out.println(" *"); System.out.println(" * *"); System.out.println(" * *"); System.out.println("*-----*"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("*-*-*-*"); } }
class Main {
public static void main(String[] args) {
System.out.println(" + ");
System.out.println(" + + ");
System.out.println(" + + ");
System.out.println("+-----+");
System.out.println("| .-. |");
System.out.println("| | | |");
System.out.println("+-+-+-+");
}
}
class Main { public static void main(String[] args) { System.out.println(" +\n + +\n + +\n +-----+\n | .-. |\n | | | |\n +-+-+-+"); } }
public class Main { public static void main(String[] args) { System.out.println(" + \n + + \n + + \n+-----+\n| .-. |\n| | | |\n+-+-+-+"); } }
package house_project;
public class Main
{ public static void main(String[] args) {
System.out.println(" #");
System.out.println(" # #");
System.out.println(" # #");
System.out.println(" # #");
System.out.println(" # #");
System.out.println(" ########");
System.out.println(" # () #");
System.out.println(" # [ ] #");System.out.println(" # [ ] #");
System.out.println(" ########");
}
}
public class HelloWorld1 {
public static void main(String[] args) {
System.out.println(" +");
System.out.println(" + +");
System.out.println(" + +");
System.out.println("+-----+");
System.out.println("| .-. |");
System.out.println("| | | |");
System.out.println("+-+-+-+");
}
}
class Main {publicstaticvoid main(String[] args) { System.out.println(" +"); System.out.println(" + +"); System.out.println(" + +"); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); }}
class Main { public static void main(String[] args) { System.out.println(" +"); System.out.println(" + +"); System.out.println(" + +"); System.out.println(" +-----+"); System.out.println(" | .-. |"); System.out.println(" | | | |"); System.out.println(" +-+-+-+"); } }
class Main { public static void main(String[] args) { System.out.println(" + "); System.out.println(" + + "); System.out.println(" + + "); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }
class Main { public static void main(String[] args) { System.out.println(" + "); System.out.println(" + + "); System.out.println(" + + "); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }
public class Main { public static void main(String[] args) { System.out.println(" + "); System.out.println(" + + "); System.out.println(" + + "); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }
(it seems like the spacing on this is different.)
class Main { public static void main(String[] args) { System.out.println(" +"); System.out.println(" + +"); System.out.println(" + +"); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }
class Main { public static void main(String[] args) { System.out.println(" *"); System.out.println(" * *"); System.out.println(" * *"); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }
class Main { public static void main(String[] args) { System.out.println(" +"); System.out.println(" + +"); System.out.println(" + +"); System.out.println("+-----+"); System.out.println("| .-. |"); System.out.println("| | | |"); System.out.println("+-+-+-+"); } }