Questions
C# The Zookeepers need a system to keep track of all their animals. They need to...

C#

The Zookeepers need a system to keep track of all their animals. They need to be able to enter all their animals into the system in a way that allows them to identify and locate them. This requires identifying them by species, age and one characteristic unique to their species.

  • There are three cages and the user must input information about the animal in each one. After accepting input for all three cages, the program should output the contents of each cage in a way that exposes all the information about that animal.
  • The program should accept the following species: Lion, Bear, Wolf.
  • Define classes for the Lion, Bear, and Wolf species that all implement the Animal interface. All Animals should have an int field for age and a String field for species. Each species of animal should have its own unique field defined: String maneColour for Lions, int speed for Wolves, and bool isGrizzly for Bears. They should also define two methods:
    • RequestUniqueCharacteristic() which outputs a string asking for a value to store in the specific animal’s unique characteristic and stores it in the appropriate field (maneColour, speed, or isGrizzly)
    • GetDescription() which outputs a short sentence that includes all the animal’s info.
  • Store all the Animals in a list of animals (List<Animal>) and iterate through the list to output all the animals after input is received.

Sample Session

Cage 1
What is the animal’s species? Lion
How old is it? 6
What colour is its mane? Brown

Cage 2
What is the animal’s species? Wolf
How old is it? 9
How fast can it run (in km/h)? 20

Cage 3
What is the animal’s species? Bear
How old is it? 12
Is it a grizzly bear (true/false)? No
=====
Cage 1 contains a 6-year-old lion with a brown mane.
Cage 2 contains a 9-year-old wolf that runs 20 km/h.
Cage 3 contains a 12-year-old non-grizzly bear.

In: Computer Science

C# The Zookeepers need a system to keep track of all their animals. They need to...

C#

The Zookeepers need a system to keep track of all their animals. They need to be able to enter all their animals into the system in a way that allows them to identify and locate them. This requires identifying them by species, age and one characteristic unique to their species.

  • There are three cages and the user must input information about the animal in each one. After accepting input for all three cages, the program should output the contents of each cage in a way that exposes all the information about that animal.
  • The program should accept the following species: Lion, Bear, Wolf.
  • Define classes for the Lion, Bear, and Wolf species that all implement the Animal interface. All Animals should have an int field for age and a String field for species. Each species of animal should have its own unique field defined: String maneColour for Lions, int speed for Wolves, and bool isGrizzly for Bears. They should also define two methods:
    • RequestUniqueCharacteristic() which outputs a string asking for a value to store in the specific animal’s unique characteristic and stores it in the appropriate field (maneColour, speed, or isGrizzly)
    • GetDescription() which outputs a short sentence that includes all the animal’s info.
  • Store all the Animals in a list of animals (List<Animal>) and iterate through the list to output all the animals after input is received.

Sample Session

Cage 1
What is the animal’s species? Lion
How old is it? 6
What colour is its mane? Brown

Cage 2
What is the animal’s species? Wolf
How old is it? 9
How fast can it run (in km/h)? 20

Cage 3
What is the animal’s species? Bear
How old is it? 12
Is it a grizzly bear (true/false)? No
=====
Cage 1 contains a 6-year-old lion with a brown mane.
Cage 2 contains a 9-year-old wolf that runs 20 km/h.
Cage 3 contains a 12-year-old non-grizzly bear.

In: Computer Science

6. Two individuals, Harry and Ron, are both working. Harry faces a 10 percent chance of...

6. Two individuals, Harry and Ron, are both working. Harry faces a 10 percent chance of becom-
ing unemployed for three months and losing $12,000 in income. Ron’s probability of becoming

unemployed is lower, at 8 percent, but he too would be unemployed for three months and
would lose $12,000 in income.
a. Suppose the employment insurance benefit rate is 55 percent so that 55 percent of lost
earnings are replaced. Calculate the expected payout for Harry and Ron.
b. Suppose that participating in the national employment insurance program is compulsory
and that the annual premium of $594 is paid by both individuals. Does this scheme involve
redistribution? If so, who gains and who loses?
c. If an actuarially fair premium was to be charged, what annual premium would each worker
be charged?

In: Economics

There are two call options for the same underlying asset and same maturity. One call option...

There are two call options for the same underlying asset and same maturity. One call option C1 has exercise price of $120 and the other call option C2 has exercise price of $150. Also, one call sells for $8 and the other sells for $10. Select the prices of C1 and C2 from the given two values. Explain the reason/s for your price selection reflecting on the payoff and profit diagrams of the call options.

In: Finance

Topic 2 TRUE OR FALSE Q’s 31.          A natural number is the number 0 or any...

Topic 2 TRUE OR FALSE Q’s

31.          A natural number is the number 0 or any number obtained by adding 1 to a natural number.

32.          The category of numbers called integers includes negative numbers.

33.          A rational number is any number that can be expressed without a fractional part.

34.          The base of a number system determines the number of digits used in the system.

35.          The digits used in any base are 1 through the base number.

36.          The base of the hexadecimal number system is 15.

37.          A number in any base can be expressed using a positional notation.

38.          The letter C is used to represent the number 11 in hexadecimal.

39.          The number 10 represents the base value in every number system.

40.          Representing a number in base 5 sometimes requires more digits than representing that same number in base 10.

41.          The value of each position in a number system is determined by subtracting the base from the position number.

42.          A byte is made up of eight binary digits.

43.          Two hexadecimal digits can be stored in one byte.

44.          Starting from the right, every group of four binary digits can be read as one hexadecimal digit.

45.          To find the decimal equivalent in a new base you just divide the decimal value by the new base.

In: Computer Science

Fuzzy Monkey Technologies, Inc., purchased as a long-term investment $130 million of 8% bonds, dated January...

Fuzzy Monkey Technologies, Inc., purchased as a long-term investment $130 million of 8% bonds, dated January 1, on January 1, 2018. Management has the positive intent and ability to hold the bonds until maturity. For bonds of similar risk and maturity the market yield was 10%. The price paid for the bonds was $115 million. Interest is received semiannually on June 30 and December 31. Due to changing market conditions, the fair value of the bonds at December 31, 2018, was $120 million.

Required:
1. to 3. Prepare the relevant journal entries on the respective dates (record the interest at the effective rate).
4. At what amount will Fuzzy Monkey report its investment in the December 31, 2018, balance sheet?
5. How would Fuzzy Monkey's 2018 statement of cash flows be affected by this investment?

In: Accounting

Academic drops have been a concern for university administration due to the negative impact they have...

Academic drops have been a concern for university administration due to the negative impact they have on graduation rates and consequently the image of the university.

The Management Department has collected the data for 10 semesters with the following results:

Academic drops from the last 20 to 10 semesters have been:

10, 7, 8, 9, 8, 6, 10, 12, 8, 10.

Has the Management Department seen a significant change in the number of academic drops over the last 5 years?

                     

              b.    The 10 most recent semesters of sample data are: 5, 6, 8, 4, 2, 4, 3, 4, 3, 2.

              

              c.    Based on your evaluation of these data should the Management Department change their program to lower academic drops?

In: Statistics and Probability

Introduction: Programmers for a Better Tomorrow Programmers for a Better Tomorrow is an organization dedicated to...

Introduction: Programmers for a Better Tomorrow

Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical societies, and scholarship organizations manage various tasks so that they can focus on making the world a better place! They have asked you and your classmates to help them develop some new programs to benefit their organizations.

After nearly a semester of C programming, you've decided that you'd like to donate your skills to create a program that organizes the typical activities for charity run weekend. In particular, your program will help manage the following:

1) Individual Registration

2) Team Registration

3) Running Events

4) Donation Totals

Your program will log the number of teams and individual who are signed up for the different races, process the racing events to see who has the fastest times, and track the total amount of money raised by teams and individuals for charity.

Header Specification

To facilitate grading, include in your header comment which portions of the assignment you have completed. You must complete all portions in order to earn full credit, but partial credit is available for completing some of the steps. The primary steps are as follows:

(1) Processing Individual Registrations

(2) Processing Team Registrations

(3) Processing the running events

(4) Calculating total donations

If your comment is accurate, meaning that you pass the appropriate tests cases corresponding to your choice, you'll earn 10 points. If your comment is roughly accurate, meaning that you sincerely attempted the items you listed, and most of them work minus a tiny bug, then you'll get 5 of these points. If your comment isn't accurate to a reasonable degree, you'll get 0 of these points.

The reason this is here is because it's very important to communicate to others accurately what you've accomplished and what is left to accomplish. This sort of honesty and ability to appraise your own work is a critical skill in a job.

Program Details

Individual Registration Details

There are a two registration windows: early registration and regular registration. Prices for registering early and regularly will be given. Each individual will have a unique number and must be processed separately to record their name, age, running event, and donations raised. The maximum number of runners for our program will be 10000.

Team Registration Details

Teams may be created and registered to sign up several participators at once. Teams may only sign up during early registration, have between 3 and 50 members, and must pay the team registration fee for every member on the team. Teams should be recorded with their name and number of members. Each member of the team still needs to be recorded with their name, age, running event, and donations raised. We can organize at most 200 teams.

Running Events Details

There will be three running events: a 5k race, a 10k race, and a marathon race. For each race, your program will receive the running time for each participant in the race. For the 5k and the 10k you should print the runner with the fastest time. For the marathon, your program will need to check times against the required qualifying times to see which runners qualify for more marathon races. These qualifying times vary by age group.

Total Donation Details

After all the races are run we want to recognize the participants who raised the most money for charity. Print the team that raised the most money for the event along with the amount raised. Then for each team, print the team member who raised the most money along with the amount raised. For the individuals, print the top individual who raised the most money along with the amount raised. Finally, print the total amount raised for the event. All donations and registration fees will be donated directly to charity.

Implementation Restrictions

You must use the following constants:

#define TEAMS 200

#define RUNNERS 10000

#define LENGTH 20

#define TEAMSIZE 50

You must use the following structures to store information:

            struct person {

                        char name[LENGTH];

                        int number;

                        int age;

                        int event;

                        float money;

float time;

};

struct team {

            char name[LENGTH];

            int nummembers;

            float money;

            struct person members[TEAMSIZE];

};

           

It is not sufficient to simply have the structures in your program, you must use them store information and process operations for the program.

Though function prototypes will not be provided, it is expected that you follow good programming design and create several functions with well-specified tasks related to the solution of this problem. Make sure to pay very careful attention to parameter passing.

Input Specification

The first line of the file contains the following three values, separated by spaces:

Cost of early registration for individuals (in dollars), Cost of regular registration for individuals (in dollars), and the cost of team registration (in dollars). These will be positive real numbers to two decimal places.

The second line of the file will contain one positive integer representing the number of early individuals and teams who are registering. Every registration will start with either TEAM or INDV for a team registration or individual registration respectively.

Lines that begin with INDV will be followed by four values, separated by spaces:

            The individual’s name, their age, their chosen running event, and the amount of donations they have raised. The first is a string, the second is a positive integer, the third is an integer from the set {5, 10, 42}, and the fourth is a positive real number.

Lines that begin with TEAM will be followed by two values, separated by spaces: the name of the team and the number of team members (k). This will be followed by k lines organized the same as the individual registration above.

After early registration completes, normal registration can begin. This will be represented by one positive integer (m) representing the number of regular registrations. All teams must use early registration. This will be followed by m lines each with four values. These are the same values that are present in individual registration: The team member’s name, their age, their chosen running event, and the amount of donations they have raised. The first is a string, the second is a positive integer, the third is an integer from the set {5, 10, 42}, and the fourth is a positive real number.

After registration, the running events can occur. Every registered participant will be listed with their number (assigned as part of registration) and the time it took them to run the race in minutes represented as a real number.

This will be followed by 10 lines of qualifying times based on age groups. They will be specified:

STARTINGAGE   ENDINGAGE      TIME

where starting age and ending age are integers, and the qualifying time is a real number representing minutes.

Output Specification

For an individual registering for an event print a line of the form:

X registered for the Y race! They have been assigned the number Z.

where X is their name and Y is the event they are registering for. Y is represented by an integer {5, 10, 42} in the input file. Replace it with “5k” for the first integer, “10k” for the second integer, and “marathon” for the third integer in this print statement. Z is their unique runner number. These numbers should start at 1 and count up to a max of 10000.

For a team registering print a line with one of the form:

X team registered for the event. They have Y members:

where X is the team name and Y is their number of members. Follow this with Y lines of the same form as the individuals: one for each member of the team.

For the 5k race and the 10k race, output a single line of the following form:

Xk race: Y had the fastest time with Z.Z minutes!

where X is either 5 or 10 respectively, Y represents the name of the fastest runner and Z represents their time.

For the marathon race, print out all the runners who times meet the qualifying times:

X qualified in the marathon run with a time of Y.Y minutes!

where X represents the name of the fastest runner and Y represents their time.

For the team that raised the most money, output a single line of the following form:

The X team raised the most money with a team donation of $Y.YY!

where X is the team name and Y is the amount they raised.

For each team, print out the person that raised the most with a single line of the following form:

X raised the most money on team Y with a donation of $Z.ZZ!

where X is the person’s name, Y is the team name, and Z is the amount they raised.

For the individual that raised the most money, output a single line of the following form:

X raised $Y.YY!

where X is the person’s name and Y is the amount they raised.

End with the total amount raised by the event:

The runners raised $X.XX for charity!

Sample Input/Output

Four sets of input and output are provided with the assignment, showing the different portions of the assignment. You should try to complete race01 first, then proceed to race02, and so forth.

race01.txt

25.5 35.75 21
5
INDV Emily 30 5 10
INDV Karla 27 10 25.6
INDV Martin 45 5 33.75
INDV Lucas 23 42 100
INDV Hayley 34 42 27.43
7
George 50 10 90.3
Evelyn 47 5 15.4
Linus 55 10 22.8
Charlie 40 42 150.75
Lucy 24 10 14.89
Leah 42 5 23.45
Thomas 29 5 10.6

race02.txt

25.5 35.75 21
7
INDV Emily 30 5 10
INDV Karla 27 10 25.6
INDV Martin 45 5 33.75
TEAM OATS 5
Maria 22 5 15.62
Caleb 41 10 20.5
Michael 30 42 18.75
Lily 33 10 31.15
Charlotte 29 5 25.8
INDV Lucas 23 42 100
INDV Hayley 34 42 27.43
TEAM RAINBOW 3
Lawrence 56 5 33.75
David 55 5 33.75
Josie 60 5 33.75
7
George 50 10 90.3
Evelyn 47 5 15.4
Linus 55 10 22.8
Charlie 40 42 150.75
Lucy 24 10 14.89
Leah 42 5 23.45
Thomas 29 5 10.6

race03.txt

25.5 35.75 21
7
INDV Emily 30 5 10
INDV Karla 27 10 25.6
INDV Martin 45 5 33.75
TEAM OATS 5
Maria 22 5 15.62
Caleb 41 10 20.5
Michael 30 42 18.75
Lily 33 10 31.15
Charlotte 29 5 25.8
INDV Lucas 23 42 100
INDV Hayley 34 42 27.43
TEAM RAINBOW 3
Lawrence 56 5 33.75
David 55 5 30.15
Josie 60 5 13.79
7
George 50 10 90.3
Evelyn 47 5 15.4
Linus 55 10 22.8
Charlie 40 42 150.75
Lucy 24 10 14.89
Leah 42 5 23.45
Thomas 29 5 10.6
1 40
2 75
3 35
4 30
5 80
6 200
7 82
8 32
9 230
10 213
11 37
12 25
13 33
14 78
15 31
16 82
17 235
18 77
19 36
20 29
18 34 215
35 39 220
40 44 225
45 49 235
50 54 240
55 59 250
60 64 265
65 69 280
70 74 295
75 79 310

race04.txt

25.5 35.75 21
7
INDV Emily 30 5 10
INDV Karla 27 10 25.6
INDV Martin 45 5 33.75
TEAM OATS 5
Maria 22 5 15.62
Caleb 41 10 20.5
Michael 30 42 18.75
Lily 33 10 31.15
Charlotte 29 5 25.8
INDV Lucas 23 42 100
INDV Hayley 34 42 27.43
TEAM RAINBOW 3
Lawrence 56 5 33.75
David 55 5 30.15
Josie 60 5 13.79
7
George 50 10 90.3
Evelyn 47 5 15.4
Linus 55 10 22.8
Charlie 40 42 150.75
Lucy 24 10 14.89
Leah 42 5 23.45
Thomas 29 5 10.6
1 40
2 75
3 35
4 30
5 80
6 200
7 82
8 32
9 230
10 213
11 37
12 25
13 33
14 78
15 31
16 82
17 235
18 77
19 36
20 29
18 34 215
35 39 220
40 44 225
45 49 235
50 54 240
55 59 250
60 64 265
65 69 280
70 74 295
75 79 310

In: Computer Science

It has been suggusted that the highest priority of retirees is travel. Thus, a study was...

It has been suggusted that the highest priority of retirees is travel. Thus, a study was conducted to investigate the differences in the length of stay of a trip for pre- and post-retirees. A sample of 691 travelers were asked how long they stayed on a typical trip. The observed results of the study are found below.

Number of Nights Pre-retirement Post-retirement Total
4−7 235 175 410
8−13 84 63 147
14−21 31 59 90
22 or more 12 32 44
Total 362 329 691


With this information, construct a table of estimated expected values.

Number of Nights Pre-retirement Post-retirement
4−7
8−13
14−21
22 or more


Now, with that information, determine whether the length of stay is independent of retirement using α=0.01.

(a)  χ2=

(b) Find the degrees of freedom:

(c) Find the critical value:  

In: Statistics and Probability

Cloud air conditioners cost $300 to purchase, result in electricity bills of $150 per year, and...

Cloud air conditioners cost $300 to purchase, result in electricity bills of $150 per year, and last for 5 years. Luxury Air models cost $500, result in electricity bills of $100 per year, and last for 8 years. The discount rate is 21 percent. a. What are the equivalent annual costs of the Cloud and Luxury Air models? Which model is more cost effective? b. Now you remember that the inflation rate is expected to be 10 percent per year for the foreseeable future. How does the inflation rate affect the evaluation of the two air conditioners?

(Please show work by using financial calculation)

In: Finance