Give theory as solution like background theory, what concepts will apply in this questions and theory in c++ language. Do not give source code just give theory.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Give theory as solution like background theory, what concepts will apply in this questions and theory in c++ language. Do not give source code just give theory. 

A teacher would like his students to play a small game. The rules
of the game require that the students be divided into 4 groups
(Red, Green, Blue and Purple) based on the following information
for each student:
1. The roll number of the student - not more than 3 digits long
and ranging between 1 and 400
2. The score of the student the last time he played this game
(scores will be between 0 and 100)
Your task is to write a program that automatically decides the new
group of the student when the above information is entered. Your
program must take into consideration the following rules for group
assignment:
Transcribed Image Text:A teacher would like his students to play a small game. The rules of the game require that the students be divided into 4 groups (Red, Green, Blue and Purple) based on the following information for each student: 1. The roll number of the student - not more than 3 digits long and ranging between 1 and 400 2. The score of the student the last time he played this game (scores will be between 0 and 100) Your task is to write a program that automatically decides the new group of the student when the above information is entered. Your program must take into consideration the following rules for group assignment:
POST-LAB TASKS
If Roll no between
And score between
The as sign this group
1 and 100
O and 25
RED
26 and 50
GREEN
51 and 75
BLUE
76 and 100
PURPLE
101 and 200
O and 25
GREEN
26 and 50
RED
51 and 75
PURPLE
76 and 100
BLUE
201 and 300
O and 25
PURPLE
26 and 50
BLUE
51 and 75
RED
76 and 100
GREEN
301 and 400
O and 25
BLUE
26 and 50
PURPLE
51 and 75
GREEN
76 and 100
RED
Note: The roll number and score entered by the user should notbe
out of their respective ranges. If they are out of range, then the
program should give an appropriate message and close down with an
appropriate flag'.
78
Transcribed Image Text:POST-LAB TASKS If Roll no between And score between The as sign this group 1 and 100 O and 25 RED 26 and 50 GREEN 51 and 75 BLUE 76 and 100 PURPLE 101 and 200 O and 25 GREEN 26 and 50 RED 51 and 75 PURPLE 76 and 100 BLUE 201 and 300 O and 25 PURPLE 26 and 50 BLUE 51 and 75 RED 76 and 100 GREEN 301 and 400 O and 25 BLUE 26 and 50 PURPLE 51 and 75 GREEN 76 and 100 RED Note: The roll number and score entered by the user should notbe out of their respective ranges. If they are out of range, then the program should give an appropriate message and close down with an appropriate flag'. 78
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning