This program will store roster and rating information for a basketball team. Coaches rate players during tryouts to ensure a balanced team. A roster can include at most 10 players.
(1) Prompt the user to input five pairs of numbers: A player's
jersey number (0 - 99) and the player's rating (1 - 9). Store the
jersey numbers in one int array and the ratings in another int
array. Output these arrays (i.e., output the roster).
Ex:
(2) Implement a menu of options for a user to modify the roster.
Each option is represented by a single character. The program
initially outputs the menu, and outputs the menu after a user
chooses an option. The program ends when the user chooses the
option to Quit.
Ex:
(3) Implement the "Output roster" menu option.
Ex:
(4) Implement the "Add player" menu option. If the user chooses this option and the roster is full, print the following error message:
If the roster is not full, prompt the user for a new player's
jersey number and rating, and append the values to the two
arrays.
Ex:
(5) Implement the "Delete player" menu option. If the user chooses the option when the roster is empty, immediately print the message:
If the roster is not empty, prompt the user for a player's
jersey number. Remove the player from the roster (delete the jersey
number and rating), paying attention not to leave unused spaces in
the two arrays.
Ex:
If the given jersey number is not found, inform the user:
(6) Implement the "Update player rating" menu option. Prompt the
user for a player's jersey number. Prompt again for a new rating
for the player, and then look up and change that player's
rating.
Ex:
In this case, if the given jersey number is not found, no further action is taken (note that the format of the program requires both input either way).
(7) Implement the "Output players above a rating" menu option.
Prompt the user for a rating. Print the jersey number and rating
for all players with ratings above the entered value.
Ex:
If no players are found above a given rating, the program will simply produce an empty list.
BONUS
For an extra 10 points, implement a secret option s that prints the message:
and sorts the roster by jersey number. Do not add this option to the MENU message. And remember to move the player rating accordingly!
I need help with my HW its in C++. it also asking for an input. thank you!!
In: Computer Science
Design a class named Employee. The class should keep the following information in fields:
· Employee name
· Employee number in the format XXX–L, where each X is a digit within the range 0–9 and the L is a letter within the range A–M.
· Hire date
Write one or more constructors and the appropriate accessor and mutator methods for the class. Next, write a class named ProductionWorker that inherits from the Employee class. The ProductionWorker class should have fields to hold the following information:
· Shift (an integer)
· Hourly pay rate (a double)
· Add hours and calculate pay
The workday is divided into two shifts: day and night. The shift field will be an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write one or more constructors and the appropriate accessor and mutator methods for the class. Demonstrate the classes by writing a program that uses a ProductionWorker object.
In: Computer Science
The following questions are on recursion in C++ Programming.
I had some trouble with these questions, can you please help me? Thank you!
Consider the following recursive function
void funcEx8(int u, char v) //Line 1
{ //Line 2
if (u == 0) //Line 3
cout << u << " "; //Line 4
else //Line 5
{ //Line 6
int x = static_cast (v); //Line 7
if (v < 'A') //Line 8
v = static_cast (x + 1); //Line 9
else if (v > 'Z') //Line 10
v = static_cast (x - 1); //Line 11
cout << v << " "; //Line 12
funcEx8(u - 2, v); //Line 13 }
//Line 14 }
//Line 15 }
Identify the base case? Using line numbers
a. |
Lines 3,4 |
|
b. |
Lines 1 through 4 |
|
c. |
Lines 7,8 |
|
d. |
Lines 5,6 |
Consider the following recursive function
void funcEx8(int u, char v) //Line 1
{ //Line 2
if (u == 0) //Line 3
cout << u << " "; //Line 4
else //Line 5
{ //Line 6
int x = static_cast (v); //Line 7
if (v < 'A') //Line 8
v = static_cast (x + 1); //Line 9
else if (v > 'Z') //Line 10
v = static_cast (x - 1); //Line 11
cout << v << " "; //Line 12
funcEx8(u - 2, v); //Line 13 }
//Line 14 }
//Line 15 }
Identify the Recursive case? Using line numbers
a. |
Lines 5 Through 15 |
|
b. |
Lines 3,4 |
|
c. |
1,2 |
|
d. |
Lines 2,3 |
Consider the following recursive function
void funcEx8(int u, char v) //Line 1
{ //Line 2
if (u == 0) //Line 3
cout << u << " "; //Line 4
else //Line 5
{ //Line 6
int x = static_cast (v); //Line 7
if (v < 'A') //Line 8
v = static_cast (x + 1); //Line 9
else if (v > 'Z') //Line 10
v = static_cast (x - 1); //Line 11
cout << v << " "; //Line 12
funcEx8(u - 2, v); //Line 13 }
//Line 14 }
//Line 15 }
Valid or Invalid
funcEx8(26, '$'); is a valid call,
a. |
None |
|
b. |
Yes and No |
|
c. |
No |
|
d. |
Yes |
Consider the following recursive function:
void recFun(int u)
{
if (u == 0) cout << "Zero! ";
else
{
cout << "Negative ";
recFun(u + 1);
}
}
what is the output if recFun(8)
a. |
Infinite loop, nonegative |
|
b. |
5 |
|
c. |
0 |
|
d. |
8 |
Consider the following recursive function:
void recFun(int u)
{
if (u == 0) cout << "Zero! ";
else
{
cout << "Negative ";
recFun(u + 1);
}
}
. what is the output if recFun(0)
a. |
12 |
|
b. |
infinite loop |
|
c. |
8 |
|
d. |
zero |
Consider the following recursive function:
void recFun(int u)
{
if (u == 0) cout << "Zero! ";
else
{
cout << "Negative ";
recFun(u + 1);
}
}
. what is the output if recFun(-2)
a. |
8 |
|
b. |
Negative Negative Zero! |
|
c. |
-2 |
|
d. |
zero |
Consider the following recursive function:
void recFun(int x)
{
if (x > 0)
{ cout << x % 10 << " ";
recFun(x / 10);
}
else
if (x != 0)
cout << x << endl;
}
what is the output of the above statement if recFun(258)?
a. |
12 |
|
b. |
3 4 6 |
|
c. |
15 |
|
d. |
8 5 2 |
Consider the following recursive function:
void recFun(int x)
{
if (x > 0)
{ cout << x % 10 << " ";
recFun(x / 10);
}
else
if (x != 0)
cout << x << endl;
}
. what is the output of the above statement if recFun(7)?
a. |
7 |
|
b. |
8 |
|
c. |
8 5 2 |
|
d. |
12 |
Consider the following recursive function:
void recFun(int x)
{
if (x > 0)
{ cout << x % 10 << " ";
recFun(x / 10);
}
else
if (x != 0)
cout << x << endl;
}
what is the output of the above statement if recFun(36)?
a. |
5 3 8 |
|
b. |
12 |
|
c. |
6 3 |
|
d. |
2 4 5 |
Consider the following recursive function:
void recFun(int x)
{
if (x > 0)
{ cout << x % 10 << " ";
recFun(x / 10);
}
else
if (x != 0)
cout << x << endl;
}
what is the output of the above statement if recFun(-85)?
a. |
12 |
|
b. |
-85 |
|
c. |
8 5 2 |
|
d. |
85 |
In: Computer Science
We mentioned that IP packets are forwarded hop-by-hop. How do
you know how many
hops are there if you ping 8.8.8.8? What does the traceroute
command do? How does this
command work? Can you explain how it works using the output of the
traceroute command
generated on your machine?
In: Computer Science
In: Computer Science
**java**
A bicycle combination lock has four rings with numbers 0 through 9. Given the actual numbers and the combination to unlock, print instructions to unlock the lock using the minimum number of twists. A “twist up” increases the number value of a ring, and a “twist down” decreases it. For example, if the actual number shown is 1729 and the desired combination is 5714, write your instructions like this:
Ring 1: Twist up 4 times
Ring 3: Twist down once
Ring 4: Twist up or down 5 times
In: Computer Science
What does the netstat command do? The netstat command has many
options. Please
explain the following commonly used options and briefly explain the
meaning of the output. How
can you know which program (i.e., process) is using a specific
port?
~$ netstat -a
~$ netstat -l
~$ netstat -s
~$ netstat -p
~$ netstat -r
~$ netstat -ie
You can ignore those lines related to UNIX domain sockets.
In: Computer Science
What does the ping command do? Please type "ping -c 4 8.8.8.8"
and explain the
output. What is this "8.8.8.8" IP address? Please briefly explain
what happens behind the
curtain when the ping command runs.
In: Computer Science
take the following html code and make it work for html validator.
heres the ,html file
<!DOCTYPE html>
<html lang="en">
<head>
<title>
GettingStarted</title>
<meta charset="utf-8">
<link href="Style.css"
rel="stylesheet">
</head>
<body>
<header><h1>GettingStarted</h1></header>
<nav>
<b>
<a
href="Home.html">Home</a>
<a
href="GettingStarted.html">Getting
Started</a>
<a
href="MaterialsNeeded.html">Materials
Needed</a>
<a
href="TroubleShooting.html">TroubleShooting</a>
<a
href="InfoMaterials.html">Infomation on
materials</a>
<a
href="CommonSoftware.html">Common
Software</a>
<a
href="ContactUs.html">Contact Us</a>
</b>
</nav>
<div
class="pic"></div>
<main>
<p>
</p>
<ul>
<img src="placeholder.png"
alt="place holder" width="200" height="200">
<li> tool requirements:
scraper,glue stick , printing material ,unjammer tool , levler if
not auto calibration
</li>
<li>error if not done: prints
wont be level or print, or material will be jamed and not
print.</li>
<img src="placeholder.png"
alt="place holder" width="200" height="200">
<li>
calibration</li>
<li>error if not done:
unleveled printing bed and prints being knocked off bed or melt, or
results in no print.</li>
<img src="placeholder.png"
alt="place holder" width="200" height="200" >
<li> software
requirements</li>
<li>error if not done: won'
be able to upload files to be printed, bad layer adhesion or
resulting poor print </li>
</ul>
</main>
</body>
</html>
heres the .css file
body{background-image:url(sky.png);
background-repeat: no-repeat;
font-family: Arial, Helvetica, sans-serif;}
#wrapper { width:80%;
margin-left: auto ;
margin-right:
auto ;
background-color: #FFFFFF;
min-width:900px;
max-width:1000px;
box-shadow: 4px 4px 4px #133926;}
header{background-color: #00B386;
color: #FFFFFF;
text-align: center;
height:60px;
padding-top: 15px;
}
html {
background: url(back.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body{
font-weight:bold;
color: #FFFFFF;
}
nav{background-color: #FFFFFF;
font-weight:bold;
text-align: center;
padding: 10px;
}
nav a {text-decoration: none;}
main{
padding:1px 20px 20px 20px;
display:block;
}
h1{margin-bottom:0;
margin-top:0;
font-family: Georgia,"Times New Roman",serif;
}
h2{color:#00664D;
text-shadow: 1px 1px #CCCCCC;
font-family: Georgia,"Times New Roman",serif;
}
h3{font-family: Georgia,"Times New Roman",serif;}
dt{color:#00664D;
}
.barn {color:#FFFF00;
}
ul{list-style-image: url(marker.gif);}
#contact{font-size:90%;}
footer{ font-size:75%;
font-style:italic;
padding:15px;
font-family:Georgia,"Times New Roman",serif;
text-align: center;}
#heroHome{background-image: url(homeimage.png);
height:300px;
background-repeat:no-repeat;
}
#heroBoard{
background-image: url();
height:300px;
background-repeat:no-repeat;
background-size: 100% 100%;
}
#heroTraining{
background-image: url();
height:300px;
background-repeat:no-repeat;
background-size: 100% 100%;
}
.placeholders{
width:200px;
height:200px;
background-image: url(placeholder.png);
background-repeat:none;
}
.pic {
float: left;
}
.container {
border: 3px solid blue;
padding: 20px 40px 40px;
max-width: 640px;
&__image {
display:
inline-block;
vertical-align:
top;
width: 46%;
margin: 20px 30px 0
0;
}
&__text {
display:
inline-block;
width: 46%;
@media (max-width:
620px) {
width: 100%;
}
}
}
In: Computer Science
Write FORTRAN 90 statements that will display an appropriate message if an integer variable test is divisible by 2,3, and or 10 using if statements.
In: Computer Science
Create a program that will take the user through an attempted dungeon escape.
The user will represent a player and the player will have a variable to represent the HP (Hit Points) which will default to 50.
Menu
The program will start with the following menu:
Welcome to dungeon escape.
1) Play the game
2) Exit the game
If option 1 is chosen, the game is played, if not the program will end.
First Set of Doors
If option 1 is chosen, the following message will display
Welcome player. You wake up in a dark hallway, and three doors appear to be your way out
. Which door will you choose? 1, 2, or 3.
prompt> You will choose one door to be a trap door. Create a constant variable to hold the value of the door that will be the trap door.
Hint
const int TRAPDOOR = 3;
If the player chooses the trap door, you will display a game over message and exit the program
Example message:
You open the door and are instantly thrown into an abyss. Better luck next time. GAME OVER.
If the player chooses the other 2 doors, the player will have their HP increased by 50 and move on to the next set of doors are displaying the following message
You pass through the door and sense of strength come over you. Your new HP is [HP value]
Second Set of Doors
You will give the player the following prompt:
You see another set of three doors.
Which door will you choose? 1, 2, or 3.
Prompt>
This time two doors will be trap doors. Create two constants to hold the value of the doors that will be trap doors
. If the player chooses the either trap door constant you will display a distinct message for each trap door and decrease the HP by 50.
Example message for Trap 1:
You open the door and are attacked by an Ogre. You escape but your HP is now [HP value].
Example message for Trap 2:
You open the door and are attached by a banshee. Your escape but your HP is now [HP value]. If the player chooses the last door, display the following message: You open the door and…. nothing happens. Lucky you!
Boss Fight
If a player makes it this far, Display the message:
You see no obstacles and your HP is now [HP value]. Press any non-space key when ready
Hint: You can use cin to read a character here. When the user presses any key, you will have to compare the user’s HP. If the user’s HP is greater than 50 display the following message: You see a dragon appear before you. It breathes fire upon you but you managed to escape with small wounds. Congratulations, you’ve escaped the dungeon! If the user’s HP is equal or less than 50 display the following message: You see a dragon appear before you. It breathes fire upon you and your weak body is engulfed immediately. Game over!
In: Computer Science
I need this in PSEUDO CODE:
This looks long, but only because I have to give you my answer to the first part.
First part of the questions (already answered)
GDOT has contacted you to help write code to control the cross walk signals in Georgia. You must create a Crosswalk Signal class with three hidden attributes (Walk, Hurry and Wait), two constructors (a default that sets all lights to on and an overloaded that sets Hurry to on for testing purposes) and a method that changes the active light to the next in the sequence (Walk, – Hurry – Wait).
CLASS NAME & VARIABLES
CLASS GDOT
// Instance Variable
Bool, Green, Yellow, Red
DEFAULT CONSTRUCTOR
GDOT()
GREEN = TRUE
YELLOW = TRUE
RED = TRUE
OVERLOADED CONSTRUCTOR
GDOT(BOOL G, BOOL Y, BOOL R)
GREEN =
G
YELLOW = Y
RED =
R
CLASS METHOD
VOID CHANGE_LIGHT()
IF GREEN
GREEN =
FALSE
YELLOW =
TRUE
ELSE IF YELLOW
YELLOW =
FALSE
RED = TRUE
ELSE IF RED
RED =
FALSE
GREEN =
TRUE
ELSE
GREEN = TRUE
Here is the part I need help with:
Now you must create two Crosswalk Signal objects (using pseudocode) from the class you just created to prove that your class works properly for GDOT, the first object should use the default constructor and the second object should use the overloaded constructor. Using the objects you just created, call the method to change the light to the next in the sequence
In: Computer Science
10. What is the relationship betwee BYOD (bring your own device) and shadow IT.
11. What is cyberloafing?
In: Computer Science
Add a sphere into Unity. write ONE C# script in Unity that does the following:
Set the sphere to a color of your choice.
Start with growing the sphere’s scale at 0.0005/frame until its scale reaches 3, then shrink
the sphere’s scale at the same rate until it reaches 1. Repeat.
Sphere rotate around the origin in XY plane at radius of 5.
position = transform.localPosition;
position.x = radius * Mathf.Sin(Time.fixedTime);
position.y = radius * Mathf.Cos(Time.fixedTime);
In: Computer Science
(My Name is NN please I need new and unique answers, please. (Use your own words, don't copy and paste),Please Use your keyboard (Don't use handwriting)
((Thank you FOR YOUR HELP))
SUBJECT: System analysis and design IT243
Q1: What are the roles of a project sponsor and the approval committee during the different SDLC phases?
In: Computer Science