Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program to draw wine glasses separated by a blank line; there are two key parameters for this: the number of wine glasses to
Write a program to draw wine glasses separated by a blank line; there are two key
parameters for this: the number of wine glasses to draw, and the size of the glasses.
Define these values in main; for optional extra credit, prompt the user for the values.
The program must define three methods to draw the various parts of a wine glass,
the flute, the stem, and the base of the glass; each will receive the wine glass size.
Drawing the glasses should be done from main by calling a fourth method,
drawGlasses
number
size
have main call that at least twice with different inputs.
Your methods can assume that the number of wine glasses to draw is
or greater,
and that the size of the wine glasses is always an odd number greater than
Here are example outputs when the number of glasses is
and their size is
or
:
Think Before Programming!
Count the number of stars and
spaces carefully for each size!
Include pseudocode for the
program and methods you write. in Write a program to draw wine glasses separated by a blank line; there are two key
parameters for this: the number of wine glasses to draw, and the size of the glasses.
Define these values in main; for optional extra credit, prompt the user for the values.
The program must define three methods to draw the various parts of a wine glass,
the flute, the stem, and the base of the glass; each will receive the wine glass size.
Drawing the glasses should be done from main by calling a fourth method,
drawGlassesnumber size have main call that at least twice with different inputs.
Your methods can assume that the number of wine glasses to draw is or greater,
and that the size of the wine glasses is always an odd number greater than
Here are example outputs when the number of glasses is and their size is or :
Think Before Programming!
Count the number of stars and
spaces carefully for each size!
Include pseudocode for the
program and methods you write.java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started