Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python programming language. Refinements: 1.1 Open members.txt file 1.2 start loop for each member 1.3 get member forename 1.4 get member surname 1.5 get member

Python programming language.

image text in transcribed

Refinements:

1.1 Open members.txt file

1.2 start loop for each member

1.3 get member forename

1.4 get member surname

1.5 get member distance

1.6 store member foren,surname and distance in members() array

1.7 end loop

1.8 close members.txt file

2.1 set furthest to distance stored for first member in members() array

2.2 start fixed loop from second member to end of array

2.3 if distance the current member walked is greater than furthest then

2.4 set furthest to current distance

2.5 end if 2.6 end fixed loop

4.1 open results.txt file

4.2 write "The prize winner members are:" to the results.txt.file

4.3 start loop for each record in members()array

4.4 if the distance the member walked is greater than 0.7*furthest

4.5 write the forename and surname to the results.txt file

4.6 end if

4.7 end loop

Note that it would have to be modular as well.

Task 2: softw are design and development (part B) The design for the walking club program is shown below. . Read members' data from file into array of records (OUuT: members(forename,surnane 2. Find the furthest distance walked Display the furthest distance walked Write club prize winners to file (IN: OuT: furthest) (IN: furthest) IN: members(forename,surname,distance), f 3. 4. ts 1.1 Open members.txt file 1.2 Start loop for each member 1.3 Get member forename 1.4 Get member surname Get member distance 1.5 member forename, surname and distance in members) array 1.7 End loop 8 Close members.txt file t furthest to distance stored for first member in members) array Start fixed loop from second member to end of array Set If distance the current member walked is greater than furthest Then Set furthest to current distance End If End fixed loop n results.txt file e "The prize winning members are:" to the results.txt file loop for each record in members() array the distance the member walked is greater than 0.7*furthest write the forename and surname to the results.txt file 1 if Using the problem description and design, implement the program in a b your choice. Your program should: be maintainable and modular use a function to find and return the furthest distance walked by a use a procedure to display the furthest distance walked follow the design and the refinements provided t evidence of your program code and the results.txt file

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_2

Step: 3

blur-text-image_3

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions