Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that will use nested loops to create the following 3 star designs. Use the attached skeleton below as a template. ( JAVA

Create a program that will use nested loops to create the following 3 star designs. Use the attached skeleton below as a template. ( JAVA )

Please do not use any other methods. Please do not use nString or any other helper methods.

For star design 3 and 4 , nested loops are required to use

Star Design #1:

**** *** ** *

Star Design #2: * ** *** **** *****

Star Design #3: *

**

***

****

*****

Star Design #4: The diamond below represents a single asterisk at the 4th position on the first row, then on the second row there are 3 asterisks starting at 3rd position. The third row has 5 asterisks starting at the 2nd position, and the fourth row has 7 asterisks starting at the 1st position. The fifth row is like the third row, and the sixth row is like the second row, while the seventh row is like the first row.

* *** ***** ******* ***** *** *

package solvingstardesigns;

public class SolvingStarDesigns {

/** * @param args the command line arguments */ public static void main(String[] args) { //Instantiate the driver class, so you can call instance methods (& not static methods) SolvingStarDesigns myStars = new SolvingStarDesigns(); myStars.makeDesign1(); myStars.makeDesign2(); myStars.makeDesign3(); myStars.makeDesign4(); } /** * Use javadoc tags to document each method: */ public void makeDesign1() { //put your code here } /** * Use javadoc tags to document each method: */ public void makeDesign2() { } /** * Use javadoc tags to document each method: */ public void makeDesign3() { } /** * Use javadoc tags to document each method: */ public void makeDesign4() { } }

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

Step: 3

blur-text-image

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

1. Identify and control your anxieties

Answered: 1 week ago