Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Intro to Java

Project 1: Winter X Games

Background

This project’s intention is to test you on your knowledge of variable declarations, variable types (String, int, double), the Scanner class, math operations, and printing. A lot of these topics are covered in Labs 1 and 2. If you did not complete Lab 1 and 2, I would suggest doing so before approaching Project 1! 

If you were unaware, the Winter X Games happen every January. The X Games bring together the top action sports athletes from across the planet. If you enjoy skiing or snowboarding, be sure to watch the highlights from last year! Here are some clips for the curious.

We are going to write a program to do two things:

1. Given the first and last name of an athlete, build their ‘competitor code’. Competitor codes are the first two letters of the athlete’s first name, and the first two letters of the athlete’s last name combined.

a. Ex: “Zeb Powell”’s competitor code is ZePo.

2. Calculate the score of an athlete after they take a run in the X Games. There will be 5 judges, each giving the athlete a score from 0-10. The final score is calculated by multiplying the mean of the 5 scores by 10. You can see the sample output below for more examples.

What To Do

1. Click here to open Project1.java and copy it into a file called Project1.java in your Cloud Shell. See the Day 1 lecture slides and Lab 1 document  for info on how to use Cloud Shell and the Command Line.

2. Inside Project1.java, you will see some starter code with a comment block inside that contains instructions on how to complete the project

3. Follow the instructions, compile, and run your program. When your program successfully prompts the user for their scores and outputs their final (out of 100), you’re done! See below for expected output. Note: the answers below are exactly correct!

4. Submit the .java file to Courseweb before 11:59PM on the due date!

Here is the expected output when the final program is run two times. Remember to compile your program first!