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
Illusion [34]
3 years ago
5

Write a code segment that will store a dinner selection in option1 based on the values of rsvp and selection. The intended behav

ior of the code segment is described below. If rsvp is true, the code segment should store in option1 a string indicating the person’s attendance and food choice. For example, if rsvp is true and selection is 1, the following string should be stored in option1. "Thanks for attending. You will be served beef." If rsvp is false, the following string should be stored in option1, regardless of the value of selection. "Sorry you can't make it." Write the code segment below. Your code segment should meet all specifications and conform to the examples.
Computers and Technology
1 answer:
Serggg [28]3 years ago
5 0

The code segment illustrates the use of conditional statements.

The execution of conditional statements is dependent on the truth value of its condition.

The required code segment is as follows:

<em>if (rsvp == true && selection = 1){</em>

<em>       option1 = "Thanks for attending. You will be served beef.";</em>

<em>}</em>

<em>else{</em>

<em>option1 = "Sorry you can't make it.";</em>

<em>}</em>

<em />

The flow of the above code segment is as follows:

  • Check if rsvp is true and selection is 1; if yes, "Thanks for attending....." is saved in option1
  • If otherwise, "Sorry...." is saved in option1

The code segment submitted can be used for several programming languages such as <em>Java, C++, C and C#.</em>

Read more about similar programs at:

brainly.com/question/14166674

You might be interested in
HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
frutty [35]

Answer:

A switch statement is a set of different outputs depending on the number of criteria asked to follow.

Given an integer number as a variable status, the algorithm would state as the following:

       int num

       switch (num) {

           case 200:

               printf(OK);

               break;

           case 403:

               printf(Fobidden);

               break;

           case 404:

               printf(Not Found);

               break;

           case 500:

               printf(Server Error);

               break;

           default:

               printf(Not a proper value);

               break;

       }

Depends on the value of hte variable "num", it will fall in one of the options above. If the variable has a different value that doesn't fit in any of the options above, it will prompt the default message.

4 0
3 years ago
What is a quick way to determine if a site might contain reliable information? looking at the title of the webpage reading the f
kvasek [131]

The answer is checking the URL.  

Looking at the URL or the web address of the website will help you determine  whether the site contains reliable and credible information or not. Domain names like .edu and .gov are usually trusted sites. What you are looking for are sites with trusted institutions that have a proven record of integrity and reliability. Domain type should always match the content. For example, .edu should have educational material.  By checking the URL, You’ll also be able to establish the person’s name or the agency that published the article.  


8 0
4 years ago
Read 2 more answers
What is the maximum duration of daily scrum meetings A:15minsB:45minsC10mins:30mins
scoray [572]

Answer:

A

Explanation:

A common approach to a daily scrum (although not the only approach) is for each member of the development team to address the following three daily scrum questions:

1. What did I accomplish since the last daily scrum?

2. What do I plan to work on by the next daily scrum?

3. What are the obstacles or impediments that are preventing me from making progress?

Development teams are typically between five to nine people. Each development team member should need no more than 90 seconds to address the three questions listed above. So, if you had a team of nine people, each of whom took 90 seconds to cover the questions, combined with some overhead of getting the meeting started and transitioning from person to person, you would end up with a meeting duration of about 15 minutes.

To emphasize that 15 minutes should be thought of as a timeboxed limit.

8 0
3 years ago
Read 2 more answers
The statistically multiplexed wan technology that is specifically designed to carry multiple kinds of traffic (data and voice is
Flura [38]
To manage and organise multiple kinds of traffic, the wide area network statistically multiplexed technology that could be used would be the ATM. Also known as the asynchronous transfer mode, this type of connection using fixed cells in encoding data with regards to the situational traffic.
5 0
3 years ago
Consider your lab assignment when reviewing the following code that will be placed in the CopyingJeroo class: public void atFlow
Mice21 [21]

Answer:

The image would be created on the second island and removed from the first island.

3 0
3 years ago
Other questions:
  • PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
    7·1 answer
  • What is an online alternative to customers sending checks via mail?
    7·1 answer
  • It is essential that a security professional is able to resolve and respond to cyber law inquiries and incidents while avoiding
    14·1 answer
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and en
    7·1 answer
  • Assume that the following table is created and stored in your database:
    5·1 answer
  • Create a Boolean function odd_number_digits(n) that returns True when a positive integer has an odd number of digits. (You may a
    15·1 answer
  • Write a program that requests the user input a word, then prints every other letter of the word starting with the first letter.
    5·1 answer
  • Indentation is useful to make the document easier to read. To increase the indentation of the paragraph, you press the increase
    10·1 answer
  • Write a calculator program that will allow only addition, subtraction, multiplication &amp; division. Have the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!