1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tpy6a [65]
3 years ago
6

Squares. Write a program class named SquareDisplay that asks the user for a positive integer no greater than 15. The program sho

uld then display a square on the screen using the character ‘X’. The number entered by the user will be the length of each side of the square. For example, if the user enters 5, the program should display the following:
XXXXX
XXXXX
XXXXX
XXXXX
XXXXX
INPUT and PROMPTS. The program prompts for an integer as follows: "Enter an integer in the range of 1-15: ".

OUTPUT. The output should be a square of X characters as described above.

CLASS NAMES. Your program class should be called SquareDisplay
Computers and Technology
1 answer:
Nana76 [90]3 years ago
8 0

Answer:

import java.util.Scanner;

class SquareDisplay {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.print("Enter an integer in the range of 1-15: ");

   int num = scan.nextInt();

   if ((num > 0) && (num <= 15)) {

     String s = "X".repeat(num) + "\n";

     System.out.print(s.repeat(num));

   } else {

     // your error handling

   }

   scan.close();

 }

}

Explanation:

You might be interested in
____ is a philosophy and a software and system development methodology that focuses on the development, use, and reuse of small,
LiRa [457]

Answer:

d.) Service-Oriented Architecture

Explanation:

Because its definition matches

4 0
3 years ago
unlike tv or newspaper ads, internet communications are interactive, and consumers can choose which messages and information the
Softa [21]

Companies often engage the services of Advertising firms to market their products. Company web offerings can be tailor-made for the consumers.

  • Advertising agencies are firms that makes, plan and handle the advertising needs of any business. They are known for handling negotiations creating tailored marketing campaigns.

A lot of agencies do not want to talk about pricing until they know what you can afford to spend.

Tailored content are delivered experiences that speak directly to customers.

This agencies uses their connections and resources to make one's campaign successful and cost-efficient.

Learn more from

brainly.com/question/23477855

5 0
2 years ago
When should you create an outline?
DIA [1.3K]

Answer:

hope you like it

Explanation:

Writing an outline can take place at any time during the writing process. Although it is most commonly used before beginning to write or doing research, this process can also take place during or after writing your paper to make sure your points are organized and make sense.

An outline is a first step for writing: a general, unfinished plan that you will use as a guideline in writing, not a finished product ready to publish. You should use it when you prepare to write a rough draft, before you started writing.

8 0
3 years ago
Which browser folder contains previously viewed web pages?
Arlecino [84]
<span>The history browser folder contains previously viewed web pages. This folder </span>stores the URLs of sites you have accessed within a defined period of time, which means you can see your browsing history.
<span> You can choose how you want to view the history by selecting a filter from the menu on the history tab.</span>
6 0
3 years ago
Describe how an alpha channel and masking color control image transparency.
Stella [2.4K]
Answe:

Control image transparency
3 0
2 years ago
Other questions:
  • WILL UPVOTE NEED ANSWERS ASAP i have till 4:30
    12·1 answer
  • You open a web page and log into your email. The traffic travels over many routers. What protocol will the routers use to determ
    6·1 answer
  • 5. The stage of engine operation when both the intake and exhaust valves are closed is the _______ stage.
    5·1 answer
  • Give an example of a language L such that |L|=5 and |L^2|=16.
    5·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
    5·1 answer
  • Which of the following allows the transmission of voice and often video communication over the internet?
    12·1 answer
  • Which of these organs is not found in the excretory system
    7·2 answers
  • All parking revenue comes from a home teams games? True or false
    5·1 answer
  • Sampson runs his own online business, and much of his success depends on the reliability and accuracy of various online data. Ho
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!