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
Let C0=[0,1]. Cn is obtained by removing the middle open interval of length α/3n from each interval of Cn-1 where α∈(0,1).
Let C=⋂Cn. Prove that C contains only boundary points, i.e., x∈C is a boundary point of C if every neighborhood of x contains at least one point in C and at least one point not in C.
In: Advanced Math
The Eastern Washington County School Corporation is interested
in comparing educational performance at four elementary schools and
has hired you to prepare a DEA model to do so. After detailed
conversations with the corporation administrative staff and the
building principals, you have isolated the following input and
output measurements:
Data is collected for each school on each measure
Develop the DEA model that would evaluate the efficiency of Ralston Elementary School. |
In: Operations Management
For this activity you will:
State your Research Topic, Objective/Purpose, and Research Question(s).
List and label the dependent and independent variables.
State the null and alternate hypotheses.
Describe which qualitative methods could be used to address your research question(s). Describe any that could be applied.
Explain which would be the most appropriate and why.
Explain the advantages and disadvantages of your selection.
In: Psychology
A project has an initial outlay of $2,378. The project will generate annual cash flows of $660 over the 4-year life of the project and terminal cash flows of $202 in the last year of the project. If the required rate of return on the project is 13%, what is the net present value (NPV) of the project?
Note: Enter your answer rounded off to two decimal points. Do not enter $ or comma in the answer box.
In: Finance
When looking at 2 ads from your social media feeds: Write the Ads
· Does this ad relate to your interests?
· Did you recently visit the website or social media pages of this company?
· How likely are you to purchase this product?
· Is the content of the ad appealing?
· How would you improve your ad?
In: Psychology
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
agree or not?
Hard data is a verifiable fact that is acquired from reliable sources. It implies data that is directly measurable, factual and indisputable. Some of the benefits of hard data are reliability, value add, prediction, and accuracy. Hard research is the gathering of numerical and demographic data which helps determine who the customers are and what they want, when they want it and how they want the product or service. Hard data describes the types of data that are generated from devices and applications such as phones, computers, smart meters, traffic monitoring systems and bank transactions. These things and this information can be measured, traced and validated. Hard data is for companies that only depend on analytics and they are used by technical savy companies. An example of hard data would be a medical study on the results of testing. Soft data is based on qualitative information such as a rating, survey or poll. It implies that the data has been collected from qualitative observations and quantified. Sometimes one might think that soft data is not reliable, but it really is. In many cases, the best data available is soft data such as customer satisfaction and product reviews. Some of the benefits of using soft data are, direct response, saves cost and time, genuine feed backs are possible, and data can not be manipulated and is reliable. Soft data is usually preferred for small business cases and projects while hard data's are required for huge businesses. An example of soft data would be to get the patients to rate their symptoms.
In: Operations Management
**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
In: Operations Management
An "internal conflict" is a struggle within a character's mind. Describe at least one internal conflict in Book 1 of The Iliad.
In: Psychology
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