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
RoseWind [281]
3 years ago
6

Write code to check that HairEyeColor is an array. e) Write code to determine: (i) the total number of respondents in the survey

.
Computers and Technology
1 answer:
jek_recluse [69]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java and first checks to see if the class name starts with the character " [ " which would indicate it is indeed an Array. If it is it prints out that it is an Array and then Prints out the number of respondents/entries that the array has. If it is not an Array it prints out that it is not an array.

if (HairEyeColor.getClass().getName().charAt(0) == '[') {

               System.out.println("Yes, it is an Array");

               System.out.println("HairEyeColor has " + (HairEyeColor.length+1) + " respondents");

           } else {

               System.out.println("It is NOT an Array");

           }

You might be interested in
A web application with an SQL server database is found to be compromised by an attacker. On examination, the email IDs of the da
Thepotemich [5.8K]

Answer:

This is what we call SQL Injection.

• SQL Injection is when an attacker compromises your database only if it is vulnerable.

• Vulnerability includes leaving an empty ""(value) or forgetting to close anything that could be attacked.

• Ways to prevent injection is to not use string concatenation.

(<em>ex.</em> "hello" + "world")

*  Use parameterized queries.

*   Immediately get rid of any unused code.

5 0
2 years ago
Write a program that produces a bar chart showing the population growth of Prairieville, a small town in the Midwest, at 20-year
Sunny_sXe [5.5K]

Answer:

#include <iostream>

#include <fstream>

using namespace std;

int main()

{

ifstream Inputfile;

Inputfile.open("People.txt"); // Open file

if (!Inputfile) // Test for open errors

{

cout << "Error opening file.\n";

return 0;

}

int Pop; // Population

// Display Population Bar Chart Header

cout << "PRAIRIEVILLE POPULATION GROWTH\n"

<< "(each * represents 1000 people)\n";

for (int Year = 1; Year <= 6; Year++)

{ // One iteration per year

switch (Year)

{

case 1 : cout << "1900 ";

break;

case 2 : cout << "1920 ";

break;

case 3 : cout << "1940 ";

break;

case 4 : cout << "1960 ";

break;

case 5 : cout << "1980 ";

break;

case 6 : cout << "2000 ";

break;

}

Inputfile >> Pop; // Read from file

// calculate one per 1000 people

//cout<<"**"<<Pop<<endl;

while(Pop > 0)

{ // Display one asterisk per iteration

// One iteration per 1000 people

cout << "*";

Pop -= 1000;

}

cout << endl;

}

Inputfile.close(); // To close file

return 0;

}

Explanation:

5 0
3 years ago
What’s considered the brain of a computer?
Colt1911 [192]

Answer: The computer brain is a microprocessor called the central processing unit (CPU).

Explanation:

The CPU is a chip containing millions of tiny transistors. It's the CPU's job to perform the calculations necessary to make the computer work -- the transistors in the CPU manipulate the data.

5 0
4 years ago
Read 2 more answers
When an event occurs, the agent logs details regarding the event. what is this event called?
Nimfa-mama [501]

If an event occurs, the agent logs details regarding the event. what is this event called GET.

The information in the agent log file is known to be the beginning of the log file, which is stated to show the agent's launch and handling of the services and configuration settings.

Keep in mind that the agent log also contains a history of the activities performed by the agent during runtime, along with any errors, and that it is utilised to investigate deployment issues.

As a result, if an event happens, the agent logs information about it. What is this GET event, exactly?

The agent monitoring services' startup and configuration settings are displayed at the log file's beginning. The sequence of agent runtime activity and any observed exceptions are also included in the agent log.

Learn more about agent logs:

brainly.com/question/28557574

#SPJ4

8 0
1 year ago
Which type of server and network topology is preferable in a bank?
Mariana [72]

Answer:

1. Database

2. Tree

<u>Database</u>

An organized collection of data, that is stored form different computer system is called Database.

<u>Tree Topology</u>

A type of network in which multiple computers are connected in a tree like structure. This type of network topology is used to organize data in database.

<u>Explanation</u>

In banks database servers are used to organize and store large volumes of financial data.

<em>To organize such type of data with the help increasing number of employs on database, tree topology is used to connect all computers of that bank on the network,</em>

3 0
4 years ago
Other questions:
  • . What year did the USA host World Cup? Right answer 1994
    5·1 answer
  • A bakery sells three types of muffins whose prices are as follows: 1- blueberry muffin, $2.98 2- chocolate chip muffin, $4.50 an
    6·1 answer
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • adding ______around calculations indicates which calculations should be performed first before following the typical order of op
    6·1 answer
  • Which is true about lists and stacks?
    8·1 answer
  • Definition of the term social factor and explain why texting while driving can be classified as a social factor causing accident
    6·1 answer
  • I've been trying to sign up but it says that it can't complete my registration right now. How did you guys get in? And how can I
    8·1 answer
  • 10. Calculate the checksum for blocks of data with the following byte sum. (a) 1220 (b) 950​
    14·1 answer
  • When you look directly at a camera lens, it may seen like there is only one lens, but entering light actually passes through a s
    12·1 answer
  • Someone please help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!