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
saveliy_v [14]
4 years ago
9

Which of the following correctly shows the general structure of a for-each loop header?for (initialization; condition; increment

)foreach (value array : condition; array-length-specifier)foreach (type variable-name : array-or-collection)for (type variable-name : array-or-collection)for (type variable-name : array-or-collection)-On each iteration the next element can be accessed using the specified variable.
Computers and Technology
1 answer:
ladessa [460]4 years ago
6 0

Answer:

for (type variable-name : array-or-collection)-On each iteration the next element can be accessed using the specified variable.

Explanation:

the general structure of a for-each loop header is represented as :

for (type variable-name : array-or-collection) - On each iteration the next element can be accessed using the specified variable.

In other words it can be represented as:

for (type variable-name : array-or-collection)

{  

   //On each iteration the variable-name will contain the next value in the array or collection and this value can be referenced in the loop body using the variable-name.

}

You might be interested in
What does a coder do on a daily basis?
Gnoma [55]

medical charts and assinging codes

8 0
3 years ago
Which of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
valkas [14]
<h2>Question</h2>

Which of the following class definition defines a legal abstract class Group of answer choices

(a)

public class Rectangle abstract {

   public abstract double findArea ( );

   

}

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

   

}

(c)

public class Rectangle {

   public abstract double findArea ( );

   

}

(d)

public class abstract Rectangle {

   public abstract double findArea ( );

   

}

<h2>Answer:</h2>

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

}

<h2>Explanation:</h2>

When a class is declared with the abstract keyword, the class is called an abstract class. Abstract classes cannot be instantiated and may include one or more abstract methods. If a class contains an abstract method, then it (the class) must be declared abstract.

In Java, abstract classes are defined using the following format:

<em>[access_modifier]</em> abstract class <em>[name_of_class]</em>

[access_modifier] specifies the access modifier of the class which could be public, private, e.t.c

abstract is the keyword that specifies that the class is an abstract class.

class is a keyword used for defining classes

name_of_class specifies the name of the class.

The only option that fulfils this format is <em>option b</em> where;

(i) The access modifier is public

(ii) The name of the class is Rectangle

Option a is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

Option c is not correct because the keyword <em>abstract</em> is missing. In other words, the class must be declared abstract since it contains abstract method findArea();

Option d is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

7 0
3 years ago
Write the definition of a function named count that reads all the strings remaining to be read in standard input and returns the
spayn [35]

Answer:

The function written in C++

int str(string word) {

int count = 1;

for(int i =0; i<word.length();i++) {

 if(word[i] == ' ') {

  count++;

 }

}

return count;

}

Explanation:

This line defines the function

int str(string word) {

This line initializes count to 1

int count = 1;

This line iterates through the input string

for(int i =0; i<word.length();i++) {

This line checks for blank space

 if(word[i] == ' ') {

Variable count is incremented to indicate a word count

  count++;

 }

}

return count;

}

<em>See attachment for full program</em>

Download cpp
8 0
3 years ago
A company accidentally sends a newsletter with a mistyped website address. The address points to a website that has been spoofed
Thepotemich [5.8K]

Answer:

Option (A) is the right answer.

Explanation:

The following terms can be described as :

Phishing: Phishing can be described as the concept of stealing personal data i.e. credit card, bank account information, etc. of customers by sending fraud emails or by making fraud webpages on the name of a reputed company.

Tailgating: tailgating can be defined as the concept of getting entry with the authorized person in a restricted zone.

Baiting: baiting can be described as the term of stealing personal data by giving greed to customers by telling them fraud offers.

Quid pro quo: quid pro quo can be defined as the concept where the attacker takes the access of the system.  

According to the scenario, the most appropriate answer is option (A) because the company sends a wrong web address which is used by hackers to collect user's personal data which comes under phishing.

3 0
3 years ago
The words, the computer is the future, has how many bits?
Nadusha1986 [10]

The words, the computer is the future, has 64 bits.Modern computer has

two types of processors which include:

  • 32 bit
  • 64 bit
<h3>Bits</h3>

This is referred to as the smallest unit of data which is used in a computer.

The 32 bit computer are the old types which have a smaller processor and is

relatively slow.

The 64 bit computer on the other hand are the modern types with large

processors and are relatively fast.

Read more about Computer here brainly.com/question/13380788

4 0
2 years ago
Other questions:
  • Why would someone need to use tools like IECacheView or MyLastSearch on a system? Do companies have the right to search a workst
    11·1 answer
  • According to the ________ definition of organizations, an organization is seen as a means by which primary production factors ar
    14·1 answer
  • Why is it important to back up data on a computer before you burn-in test the cpu?
    9·1 answer
  • Describe the six clauses in the syntax of an SQL retrieval query. Show what type of constructs can be specified in each of the s
    14·1 answer
  • What is an example of the most important role of a systems analyst in any corporation?
    10·1 answer
  • You suspect that an attacker has hidden files on your machine. What Linux command would you use to search for files with a file
    14·1 answer
  • How get end portals in mope
    15·1 answer
  • Debug the code in the main method of this class, which is intended to initialize an array named arr to hold 3 ints, fill this wi
    15·1 answer
  • <img src="https://tex.z-dn.net/?f=%20%5Csf%20%7B%20%5Cfcolorbox%7Bgold%7D%7Bg%7D%7B%20Define%20malware%7D%7D%20" id="TexFormula1
    9·1 answer
  • You have been given an encrypted copy of the Final exam study guide here, but how do you decrypt and read it???
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!