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
emmasim [6.3K]
2 years ago
6

(Display characters) Write a method that prints characters using the following header: public static void printChars(char ch1, c

har ch2, int numberPerLine) This method prints the characters between ch1 and ch2 with the specified numbers per line. Write a test program that prints ten characters per line from 1 to Z. Characters are separated by exactly one space.
Computers and Technology
2 answers:
Butoxors [25]2 years ago
6 0

Answer:

Written in Java

public static void printChars(char ch1, char ch2, int numberPerLine){

        int i = 1;

        for(char A = ch1; A <= ch2; A++){

            if(i<=numberPerLine){

               System.out.print(A+" ");    

               i++;

            }

            else{

                System.out.println();

                i = 1;

            }

        }

    }

Explanation:

This line defines the method

public static void printChars(char ch1, char ch2, int numberPerLine){

This line initializes the number of print out per line to 1

        int i = 1;

The following is an iteration that prints from ch1 to ch2. Note that ch1 and ch2 are characters

        for(char A = ch1; A <= ch2; A++){

The following if condition (italicized) checks if the number of print outs is up to the required length.

If No, the character is printed

If yes, a new line is printed.

      <em>      if(i<=numberPerLine){</em>

<em>                System.out.print(A+" ");    </em>

<em>                i++;</em>

<em>             }</em>

<em>             else{</em>

<em>                 System.out.println();</em>

<em>                 i = 1;</em>

<em>             }</em>

        }

    }

See attachment for full program including test of ten characters in a line

Download txt
Juli2301 [7.4K]2 years ago
5 0

public class MyClass {

   public static void printChar(char ch1, char ch2, int numberPerLine){

       int i = 0;

       for (char c = ch1; c <= ch2; c++){

           while (i < numberPerLine){

               System.out.print(c + " ");

               i += 1;

           }

           System.out.println("");

           i = 0;

       }

   }

   public static void main(String args[]) {

     printChar('a', 'z', 10);

   }

}

So far, this works by printing letters. If you need me to modify the code, I will.

You might be interested in
When talking about changes related to information​ technology, the text identifies three interrelated changes that are responsib
Travka [436]

Answer:

The Growing use of Big data

Explanation:

In information technology big data is along with mobile digital platforms and cloud computing are responsible for bulk of innovations.

Big data is a large set of data that can be analyzed and used for pattern recognition, and extract information from different collection of data. This analysis or collection of data leads to innovation in the field of information technology.

8 0
3 years ago
What are some reasons DNS is necessary? Check all that apply. A. It maps local addresses to simple names without editing hosts f
dsp73
Domain Name Servers (DNS) are certainly necessary for easy access of resources across a network. The applicable options of the above are A and B - below are explanations as to why.

A: Computers generally are set to automatically obtain DNS information from the network they are connected to or can be pointed to a specific DNS server. This allows for records of where resources (network attach storage devices, other computers on local network, or even website server details) are located on a “master” kind of list so that the local machine’s host file does not have to be routinely updated to contain new addresses.

B: DNS, as explained partially by the answer to A, maintains a type-able or “human readable” domain name for the actual server’s IP address so we don’t have to memorize or keep a list of IPs for where we want to visit on the web (although, Google’s 8.8.8.8 IP address does make it easy). It shows an association between a name/domain name and an IP address so that we can enter something simple (Google.com) and the computer knows where to go (the server at IP address 8.8.8.8) so it can show you the content you want to see.

C: DNS would only simplify remote access if your were attempting LAN (Local Area Network) remote access of another computer on your network. DNS would not make it easier for remote access of a computer on the internet, as most DNS used in non-commercial settings are created and maintained by third-parties that will not put a specific record for one of your computers in it - not that you would want them to either, since it could lead to an open cyber attack.

D: Network throughput is a fancy phrase for network speed. It could be possible that different DNS servers could process requests faster than others, but it is not likely to increase network speed on the whole as navigating via IP or DNS records will be relatively the same speed.
3 0
2 years ago
Glenda operates an Airbnb business in which she rents an apartment for $150US per night . There is a mandatory deposit of 50 dol
Kipish [7]

Answer:

Steps of the technological design process include: identify a problem, research the problem, generate possible solutions, select the best solution, create a model, test the model, refine and retest the model as needed, and communicate the final solution.

Explanation:

3 0
2 years ago
Long Answer Questions: a. Briefly explain the types of Control Structures in QBASIC.​
Alexus [3.1K]

Answer:

The three basic types of control structures are sequential, selection and iteration. They can be combined in any way to solve a specified problem. Sequential is the default control structure, statements are executed line by line in the order in which they appear.

7 0
3 years ago
listen to exam instructions a small business called widgets, inc. has hired you to evaluate their wireless network security prac
Alex

Following actions could you most likely advise the client taking to strengthen the security of their wireless network-

  • Change the default SSID to anything different.
  • Turn off SSID broadcasting.
<h3>Explain the term wireless network security?</h3>
  • Designing, putting into practice, and ensuring security on such a wireless computer network are all parts of wireless network security.
  • A wireless computer network is further protected by this subset of network security.
  • Wireless security is another name for wireless network security.

For the stated question-

  • Disabling SSID broadcast and changing the network name are advised.
  • By disabling SSID, the network name won't be displayed on devices looking for a network can connect to, and so by changing the name, it will be impossible for anyone who already knows the old name to connect.
  • Both of which significantly boost security.

To know more about the wireless network security, here

brainly.com/question/28257213

#SPJ4

3 0
1 year ago
Other questions:
  • Discuss Hashing and how it is utilized within the IT industry. Also, discuss how Hashing can improve our sorting and searching r
    12·1 answer
  • Where is the insert function button found in microsoft excel?
    11·1 answer
  • The invention of the transistor was important to the development of computers because
    14·1 answer
  • The ________ is responsible for the Internet's domain name system and the allocation of IP addresses.
    12·1 answer
  • The merge sort algorithm sorts using what technique?
    8·1 answer
  • You are troubleshooting a client connectivity problem on an Ethernet network. The client system has intermittent connectivity to
    9·1 answer
  • Solve(-8/3)+7/5 please answer​
    5·1 answer
  • I need more friends plz talk with me
    6·2 answers
  • Which family does Ms word 2007 belongs to?​
    6·2 answers
  • College entrance requirements are the expectations for admission.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!