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
balu736 [363]
2 years ago
13

(1) Prompt the user to input an integer between 32 and 126, a float, a character, and a string, storing each into separate varia

bles. Then, output those four values on a single line separated by a space.
Computers and Technology
1 answer:
s344n2d4d5 [400]2 years ago
7 0

Answer:

Explanation:

start with what you know

You might be interested in
Just a quick question, how do you set something == to char and int in an if statement (java)
Troyanec [42]

This is the requested code in java.

public class <em>CharTest</em> {

   public static String checkCharacter(String text, int index) {

       if (0 <= index && index <= text.length()) {

           char ch = text.charAt(index);

           if (Character.isLetter(ch)) {

               return ch + " is a letter";

           } else if (Character.isDigit(ch)) {

               return ch + " is a digit";

           } else if (Character.isWhitespace(ch)) {

               return ch + " is a whitespace character";

           } else {

               return ch + " is an unknown type of character";

           }

       } else {

           return "index " + index.toString() + " is out of range";

       } // <em>end if</em>

   } // <em>end function checkChar()</em>

   public static void <em>main</em>(String[] args) {

       // <em>Test the three samples from the specification.</em>

       System.out.println(<em>checkCharacter</em>("happy birthday", 2));

       System.out.println(<em>checkCharacter</em>("happy birthday", 5));

       System.out.println(<em>checkCharacter</em>("happy birthday 2 you", 15));

   } // <em>end function main()</em>

} // <em>end class CharTest</em>

The function <em>checkcharacter</em>(text, index) returns a string value describing the kind of character found at the position in text specified by index; whether it was a letter, digit, whitespace, or an unknown kind of character.

How it does that is to make use of respective functions defined within the Character class in java. That is

  • isLetter(char) returns a bool specifying if the char parameter is a letter.
  • isDigit(char) returns a bool specifying if the char parameter is a digit.
  • isWhitespace(char) returns a bool specifying if the char parameter is a whitespace character.

It calls these functions in an if statement. These else part of the if statement is then executed if the character is neither a <em>letter</em>, <em>digit</em>, or <em>whitespace</em>.

Finally, the function main() calls <em>checkCharacter</em>() three times to test the function and return the results to the console.

Another example of a java program on characters is found in the link below

brainly.com/question/15061607

3 0
2 years ago
The area that holds all the instructions the computer needs to start up when it is powered on is ________.
stepan [7]

The area that holds all the instructions the computer needs to start up when it is powered on is b) ROM

Further Explanation:

RAM and ROM are the types of memory. RAM is the active memory. The data can be read and written from RAM. While ROM is read only which meas that data or instructions on ROM cannot be changed.

The files or instructions that are needed to start up a computer are usually unchangeable as they always have to be the same. These type of instructions are stored in ROM. When he computer is turned on, the instructions needed to start the computer are loaded into the main memory from the ROM.

Hence, ROM is the correct answer.

Learn more at:

  • brainly.com/question/10196212
  • brainly.com/question/10250188

#LearnwithBrainly

7 0
3 years ago
Which form of malware contains hidden code that is triggered by meeting or reaching a specific condition? (A) Trap door (B) Viru
Alborosie

Answer:

D- Trojan Horse

Explanation:

Trojan horse is a malware that has hidden code and look legitimate in order to damage or transfer harmful action on the computer.

Example hackers can disguise as Trojan horse by spying on the victims computer in order to gain access to sensitive data on the computer over the network.

3 0
2 years ago
By negatively influencing data collection, ____ can have a detrimental effect on analysis.
oksano4ka [1.4K]

By negatively influencing data collection, <u>bias</u> can have a detrimental effect on analysis.

In statistical analysis, bias occurs when the data collected is not a true representation of the group under study. Bias occurs due to various mistakes or errors that occur at the time of data collection and sampling.

If a particular data is negatively influenced, then this means that there will be a bias in the expected results. Such a case can be highly detrimental especially if the studies would be implemented for a human issue.

The bias produced by a negative influence will cause errors in the analysis of the data leading to an overall wrong result.

To learn more about bias, click here:

brainly.com/question/24491228

#SPJ4

7 0
10 months ago
1. Add the following method to the Point class:
Pachacha [2.7K]

Answer:

Explanation:

The following code is written in Java and creates all of the methods that were requested in the question. There is no main method in any of these classes so they will have to be called from the main method and call one of the objects created method for the code to be tested. (I have tested it and it is working perfectly.)

class Point {

   private int x, y;

   public void Point(int x, int y) {

       this.x = x;

       this.y = y;

   }

   public double distance (Point other) {

      double distance = Math.sqrt(Math.pow((other.x - this.x), 2) + Math.pow((other.y - this.y), 2));

      return distance;

   }

   

   public int quadrant() {

       if (this.x > 0 && this.y > 0) {

           return 1;

       } else if (this.x < 0 && this.y > 0) {

           return 2;

       } else if (this.x < 0 && this.y < 0) {

           return 3;

       } else if (this.x > 0 && this.y < 0) {

           return 4;

       } else {

           return 0;

       }

   }

}

class Name {

   String firstName, lastName;

   char middleInitial;

   

   public String getNormalOrder() {

       String fullName = firstName + " " + middleInitial + " " + lastName;

       return fullName;

   }

   

   public String getReverseOrder() {

       String fullName = lastName + ", " + firstName + " " + middleInitial;

       return fullName;

   }

}

4 0
2 years ago
Other questions:
  • When an architect designs a building, what visual design elements could be used to help capture a viewer’s attention? A) The use
    5·2 answers
  • The protocol that enables computers on the Internet to communicate with each other is called _____.
    7·1 answer
  • A DSLR camera is made up of two parts. They are
    13·2 answers
  • Julie bought a house for $315,000 and has a $285,000 mortgage. she claims she has $315,000 in equity. is she correct? if not, ho
    12·2 answers
  • One of the most toxic components of a computer is the
    11·1 answer
  • In the RGB model, which color is formed by combining the constituent colors?
    14·2 answers
  • You are configuring a switch that has three hosts attached to FastEthernet 0/2 through 0/4. All three hosts are part of a public
    11·1 answer
  • Aranjează următoarele cuvinte din documentul word Proiect, într-o scrisoare în care soliciți directorului școlii sprijin în priv
    8·1 answer
  • Explain information technology ?
    10·1 answer
  • which process consists of one application program following a logical access path (lap) and then a dbms following a physical acc
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!