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
Andru [333]
2 years ago
11

Consider a Games Expo for Children. Six competitions are laid out for the expo. Tickets are sold according to the age and gender

. The ticketing module of the Game Expo system is to be tested. According to the scenario, we got six scenarios based on the age and the competitions
1. Boys age > and <10, can participate in Storytelling.
2. Girls age >7 and <10, can participate in Drawing.
3. Boys age >11 and <15, can participate in a Quiz.
4. Girls age >10 and <15, can participate in Essay Writing.
5. Boys and girls age<6, can participate in Rhyming.
6. Girls and boys age >20, can participate in Poetry.
Computers and Technology
1 answer:
AysviL [449]2 years ago
3 0

Answer:

The program to this question can be defined as follows:

Program:

import java.util.*;  //import package for user-input

public class GamesExpo //defining GamesExpo class

{    

public static void main(String ag[]) //defining main method

{              

int age,gender; //defining integer variable

System.out.println("Welcome to Games Expo: ");   //print message

System.out.println("Enter age to get your type of games: ");//print message  

Scanner ob2=new Scanner(System.in); //creating scanner class object

age= ob2.nextInt(); // input value in age variable

System.out.println("Enter Gender, 1 for boy, 0 for girl"); //print message  

gender= ob2.nextInt(); // input value in gender variable

//defining conditional statement and print value according to user input  

if(gender==0) //if gender assign a value that is 0.

{

if(age>7 && age<10) //check age is in between 7 to 10  

{

System.out.println("Drawing");  //print message

}

else if(age>10 && age<15) //check age is in between 10 to 15

{

System.out.println("Essay Writing");  //print message

}

else if(age>20) //check age is greater 20

{

System.out.println("Poetry");  //print message

}

else // else block

{

System.out.println("Rhyming"); //print message

}

}

else if(gender==1) ///check gender value is equal to 1

{

if(age>7 && age<10) //check age is in between 7 to 10

{

System.out.println("Storytelling");  //print message

}

else if(age>11 && age<15) //check age is in between 11 to 15

{

System.out.println("Quiz");  //print message

}

else if(age>20) //check age is greater 20

{

System.out.println("Poetry");  //print message

}

else //else block

{

System.out.println("Rhyming");//print message

}

}

else //else block

{

System.out.println("Wrong choices");    //print message

}

}  

}

Output:

Welcome to Games Expo:  

Enter age to get your type of games:  

12

Enter Gender, 1 for boy, 0 for girl

1

Quiz

Explanation:

In the above program, first import the package for user input then defines the two integer variable "age and gender", in which we take input from the user end, by creating scanner class object, in the next line, the conditional statement is defined, that first checks the input value and print its value according to the condition.  In this program, there are multiple condition statement is used so, these conditions can be explained by the given output:

  • In the code execution time, first, it will input age, according to the age value, it will find the game in the given condition, for example, user input age value, i.e. equal to "12".
  • In this age value, it will select two games, for boys, it will select "Quiz", and for the girl, it will select "Essay Writing".
  • Then it will input the value of the gender, 1 for boy and 0 for a girl. if user input 1 so it will print "quiz", otherwise it will print "Essay Writing".
You might be interested in
I NEED HELP!! What is the portrait mode?
Rashid [163]

Answer:

A its achromatically save your file

5 0
2 years ago
Read 2 more answers
When you start a browser, it automatically loads and displays a page from a web site. This is known as your ____. Class: compute
EastWind [94]

Answer:

Index page.

Explanation:

The index page is the URL or local file that automatically loads when a web browser starts and when the browser's 'home' button is pressed. The term is also used to refer to the front page, web server directory index, or main web page of a website of a group, company, organization, or individual.

6 0
3 years ago
Find an example of a print or Internet ad that includes images and text, and then answer
WARRIOR [948]

4. Find an example of a print or Internet ad that includes images and text, and then answer the following questions about it.

           a. Describe the ad. (1-3 sentences. 1.0 points)

Mcdonald's all day breakfast. It shows their breakfast items, with high-quality images.

b. What do you think this ad's marketing message is? (1-5 sentences. 2.0 points) TIP: Does it use a specific desire or fear, or does it try to show how the product is a need or how it solves a problem?

They use desire because they show their delicious looking food, and the customers are wanting it.

c. Is the ad trying to get people to do something? If so, what is it trying to get people to do? If it isn't trying to get people to do something, what do you think the point of the ad is? (1-5 sentences. 2.0 points)

The ad is trying to get people to stop at Mcdonalds and buy their breakfast items

           d. Do you think this ad is effective? Why or why not? (1-5 sentences. 2.0 points)

Yes I think this ad is effective because it is showing high quality images of their breakfast items that encourage people to stop by and try their products.

3 0
3 years ago
Which of the following statements most accurately summarizes the creation of programming languages?
adelina 88 [10]

Answer:

Option 4: Different programming languages are better for different functions, and new programming languages are being written all the time.

Explanation:

All programing languages are best in their own perspective. Some are easy to handle while other have a smart but tricky context. Therefore different languages are suitable for different functions.

Functional Programming is the term depicting the modularity of code. In actual, it deals the data and functions as immutable. Which means the program state is never changed, the data you pass into the function is returned in a transformed form but actual data is not changed. Not all languages offer functional programming, the top languages which are better with such features are:

  1. Java Script
  2. Python
  3. C++

Moreover, new programming languages are being written for more and more convenience and ease. They are being introduced day-by-day because:

  • There is a need of new features.
  • Flaws in previous languages.
  • More functionality is needed in smaller time.
  • Code needs to be more and more smaller.

3 0
3 years ago
What does spyware do on your computer?
faust18 [17]
Spyware is a type of malware that is installed on a computer without the knowledge of the owner in order to collect the owners private information. Spyware is often hidden from the user in order to gather information about internet interaction, keystrokes (also known as keylogging), passwords, and other valuable data. if this helps any....
6 0
2 years ago
Other questions:
  • Who is good with Introduction to photography? I don’t know nothing about cameras if you do please contact me ASAP
    13·1 answer
  • A review of the sales, costs, and profit projections for anew product to find out whether these factors satisfy the company'sobj
    15·1 answer
  • What type of application would be appropriate for learning a foreign language?
    15·2 answers
  • Which of the following is false about arrays? Group of answer choices
    15·1 answer
  • Recent trends on operating system
    7·1 answer
  • 8.11 LAB: Count characters - functions Write a program whose input is a character and a string, and whose output indicates the n
    6·1 answer
  • Determine what is printed by the following code.
    8·1 answer
  • Monster Collector
    7·1 answer
  • A) Calculate the checksum of following 2 bytes: 00110101 and 10101100, and fill in the blank:
    14·1 answer
  • Mechanisms that can be used to rescue accident victims
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!