Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* * * CORAL CODE FORMAT ONLY * * * Overview Now that you have had experience tackling a larger coding project, it is time

***CORAL CODE FORMAT ONLY***
Overview
Now that you have had experience tackling a larger coding project, it is time to expand your newly curated expertise to other scenarios. For this assignment, you will consider different strategies and approaches that you might have used if you selected one of the other two scenarios when working on your project. While there will be some differences, you will also notice areas where you could use similar tactics to those you already applied in your chosen project work. Highlighting these areas will be important in showing ways that the skills you have gained will continue to translate to other situations as you continue down your educational and professional pathway.
Below is the chosen scenario:
Spaceship Race: There are two spaceships racing across the galaxies toward a distant star. The spaceships make progress by getting a "boost," or a value between 0 and 10. The first spaceship to reach the distant star wins. The distance of the star the spaceships are racing toward is provided as input by the user (a value between 25 and 100). The boost value is determined from the computer generating a random number between 0 and 10. The object is to have the spaceships race, and then as soon as one spaceship reaches the destination, which spaceship won or if there was a tie is provided as output.
Prompt
To begin working on this assignment, first select one of the project scenarios that you did not already design a flowchart, pseudocode, and code for. Then begin thinking about how you would design one loop for the game you have selected.
Specifically, you must address the following rubric criteria:
Explain how you would write code for one loop in the selected game. Be sure to mention any strategies you would need to use in your design. Remember that your loop will need to meet the requirements of the program. You should use a WHILE or a FOR loop along with the appropriate relational operators (==,!=,<,>,<=, and >=). Using the appropriate relational operators will also be important in ensuring there is an exit condition, so no infinite loops are are created. As you work, you may wish to try sketching out a flowchart or drafting pseudocode to support your ideas. You do not need to create any code for this assignment, but you can also try out some practice code in the zyBook, which you can access in the links below. Doing this will help you analyze your thought process and check whether you are on the right track, if you choose. Focus on the following loop:
Spaceship Race Game: Consider code that will apply a boost value to one spaceship in the race toward the distant star.
Discuss the differences and similarities between coding strategies used in each scenario. Consider the work you completed in your projects along with how you would design code for one loop of of the new scenario you have chosen. Compare the two scenarios and explain why similar or different strategies might be used. For example, think about whether you would need to use a different type of loop.
Discuss potential challenges in coding the loop. If you were to create code for the entire new scenario you selected, what do you think would be challenging and why? Also think about potential ways to overcome those challenges as you design. The strategies you consider here could end up being useful in other future code designs as well. You may wish to discuss planning ahead with a flowchart and pseudocode. You may also wish to discuss methods you would use to keep your code organized.
What to Submit:
Submit your completed analysis as a 1- to 2-page Microsoft Word document. Be sure to also include any flowchart, pseudocode, or coding examples that you create to support your ideas.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions