Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . c You have been asked to help a local cycle shop with a problem with their software. When you investigate you discover that
c You have been asked to help a local cycle shop with a problem with their software. When you investigate you discover that the functions needed to support the program seem to be missing. Read the program and documentation below and then answer the following questions.Documentation
tableLeg measurement cmWheel SizeToo short return Too tall return
Gear ratios are calculated by dividing the number of teeth on the drive gear input teeth by the number of teeth on the driven gear output teeth
Shifting up a gear means doubling the number of teeth on the drive gear and halving the number of teeth on the driven gear.
i Write the function calculatewheelsize You should make sure to include a suitable function header and return the correct value.
Marks
ii Write the function calculategearratio You should make sure to include a suitable function header and return the correct value.
Marks
iii. Write the function shiftup You should make sure to include a suitable function header and return the correct values.
Marks
d
Professional software developers apply a set of style guidelines when writing their code in order to make their code easier to maintain, read and share with others. The following code snippet has been written by a poor programmer:i Find and list four stylistic faults in this code.ii What is the code doing marks marksTotal Marks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started