Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how we can display a pattern on the output window using literal string constants

ID: 3638350 • Letter: H

Question

how we can display a pattern on the output window using literal string constants sent to the cout object provided by C++ iostream library. We also saw how we can farm out the tasks to be performed to separate functions. In this assignment you will use these concepts to display three initials of your name. Each displayed initial is to be a pattern (9 columns, 7 rows) formed by repeating the letter so the pattern looks like the letter itself. We will use upper case letters only. For example, a large initial T might look like
TTTTTTTTT
TTTTTTTTT
TTT
TTT
TTT
TTT
TTT
You will need to write a separate function for each of the initial letters of your name. The 'main' function will consist of 5 function calls only.

Explanation / Answer

public interface Carryable { public GroceryItem[] getContents(); public String getDescription(); public float getPrice(); } Here is a class that represents a GroceryItem that you buy at the grocery store: public class GroceryItem implements Carryable { String name; float price; float weight; // in kg public GroceryItem(String n, float p, float w) { name = n; price = p; weight = w; } }