answer.
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
Brrunno [24]
2 years ago
5

A summer camp offers a morning session and an afternoon session.

Computers and Technology
1 answer:
defon2 years ago
5 0

Answer:

(A) IF (IsFound

(afternoonList, child))

{

APPEND (lunchList, child)

}

Hope this helps!

You might be interested in
In this programming assignment, you will create a hierarchy of classes (see below) that inherit from the beverage class. The bas
harina [27]

Answer:

public class GetInfo{

Beverage[]  beverages=new Beverage[100];

int i=0;

GetInfo(Beverage b){

beverages[i]=b;

i++;

}

public void Display(){

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

cout<<beverage[i].tostring();

}

Explanation:

we are taking Beverages array to store all values and in constructor we are adding that to the list and Display() function prints the vale

5 0
1 year ago
Dani is paraphrasing from a paragraph of an article for a post on her blog. Which of the following strategies is least likely to
koban [17]
I would say A. She reads the entire paragraph, then rewrites it in her own words, and then checks to make sure her version is not too similar to the text from the article.


All the other ones are a little too obvious.


Hope this helps you, baii <33

4 0
2 years ago
Read 2 more answers
Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
Alex787 [66]

Answer:

One of the strategies to avoid nested conditional is to use logical expressions such as the use of AND & operator.

One strategy is to use an  interface class with a method. That method can be created to be used for a common functionality or purpose. This is also called strategy design pattern. You can move the chunk of conditional statement to that method. Then each class can implement that interface class and use that shared method according to their own required task by creating objects of sub classes and call that common method for any such object. This is called polymorphism.

Explanation:

Nested conditionals refers to the use of if or else if statement inside another if or else if statement or you can simply say a condition inside another condition. For example:

if( condition1) {  

//executes when condition1 evaluates to true

  if(condition2) {

//executes when condition1  and condition2 evaluate to true

  }  else if(condition3) {

 //when condition1 is true and condition3 is true

} else {

 //condition1  is true but neither condition2 nor conditions3 are true

}  }

The deeply nested conditionals make the program difficult to understand or read if the nested conditionals are not indented properly. Also the debugging gets difficult when the program has a lot of nested conditionals.

So in order to avoid nested conditionals some strategies are used such as using a switch statement.

Here i will give an example of the strategies i have mentioned in the answer.

Using Logical Expressions:

A strategy to avoid nested conditionals is to use logical expressions with logical operators such as AND operator. The above described example of nested conditionals can be written as:

if(condition1 && condition2){  //this executes only when both condition1 and condition2 are true

} else if(condition1 && condition3) {

this executes only when both condition1 and condition3 are true

} else if(condition1 ){

//condition1  is true but neither condtion2 nor condtion3 are true  }

This can further be modified to one conditional as:

if(!condition3){

// when  condition1 and condition2 are true

}

else

// condition3 is true

Now lets take a simple example of deciding to go to school or not based on some conditions.

if (temperature< 40)

{

   if (busArrived=="yes")

   {

       if (!sick)

       {

           if (homework=="done")

           {

               printf("Go to school.");

           }

       }                    

   }

}

This uses nested conditionals. This can be changed to a single conditional using AND logical operator.

if ((temperature <40) && (busArrived=="yes") &&

(!sick) && (homework=="done"))

{    cout<<"Eligible for promotion."; }

The second strategy is to use an interface. For example you can

abstract class Shape{

//declare a method common to all sub classes

  abstract public int area();

// same method that varies by formula of area for different shapes

}

class Triangle extends Shape{

  public int area() {

     // version of area code for Triangle

return (width * height / 2);

  }

}

class Rectangle extends Shape{

  public int area() {

     // version of area code for Rectangle

    return (width * height)

  }

}

// Now simply create Rectangle or Triangle objects and call area() for any such object and the relevant version will be executed.

4 0
1 year ago
The molecule 2,2-diisopropylheptane is incorrectly named. what is the correct name?
pentagon [3]
Isopropyl is: CH3 - CH - CH3
                                |

Heptane is: CH3 - CH2 - CH2 - CH2 - CH2 - CH2 - CH3

Then 2,2 isopropyl heptane is:

CH3 - CH - CH3
           |
CH3 - C - CH2 - CH2 - CH2 - CH2 - CH3
           |
CH3 - CH - CH3.

There you can count that the longest carbon chain has 8 carbon atoms.
So the right name is of an octane.

I will rearrange the chain to show the 8 carbon chain in a row:

           CH3   CH3
           |          |
CH3 - CH -   C - CH2 - CH2 - CH2 - CH2 - CH3
                      |
           CH3 - CH - CH3

Now, you can see that the right name is 3 isopropyl - 2, 3 dimethyl octane




5 0
1 year ago
Consider an improved version of the Vigen ere cipher, where instead of using multiple shift ciphers, multiple mono-alphabetic su
anzhelika [568]

Answer:

Kasiski’s method for determining 't' works for Vigenère cipher as well. The only difference is therefore in the second stage of the attack. In the second stage, one needs to build a frequency table for each of the 't' keys, and carry out an attack like on the mono-alphabetic cipher. Given a long enough plaintext, this will work successfully.

Explanation:

Kasiski method is a method of attacking polyalphabetic substitution ciphers such as Vigenère cipher. It is also called Kasiski test or Kasiski examination.

The method involve finding the length of the keyword and then dividing the message into that many simple substitution cryptograms. Frequency analysis could then be used to solve the resulting simple substitution.

6 0
2 years ago
Other questions:
  • Allows you to manually add an entry to the arp cache that resolves the ip address inetaddr to the physical address etheraddr. wh
    13·1 answer
  • Jason is working on a web page that includes Q&amp;A interactions. Which option should Jason select to engage users in the inter
    9·2 answers
  • if you had two proxy servers located in the same room, what use could you make of them? nothing create a hub sell one of the ser
    14·2 answers
  • python Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value i
    7·1 answer
  • You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
    11·1 answer
  • What level of fault is the following example: North Lake Hospital followed all of the HIPAA policies and procedures for securing
    12·2 answers
  • Write a method called makeStars. The method receives an int parameter that is guaranteed not to be negative. The method returns
    6·1 answer
  • Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 19
    6·1 answer
  • Create an abstract Division class with fields for a company's division name and account number, and an abstract display() method
    14·1 answer
  • For his class project, Matt has to create an image in a color scheme that has shade or tint variations of the same hue. Which co
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!