Create a solution algorithm that employs loops.

Assignment Help Data Structure & Algorithms
Reference no: EM13810728

Winner of the Chevy and Ford Racing Teams

Given a simple problem that requires iteration, create a solution algorithm that employs loops.

Given a simple problem that requires simple data structures, design, code, and test a solution algorithm that uses arrays. 

Given a more complex problem, develop a complete solution that includes a comprehensive statement of the problem, complete program design, and program documentation.

Scenario

There are eight cars in each team called Chevy and Ford. One car from each team races its opponent on the drag strip. Read in the racing times for the eight Chevy cars and then read in the times for the eight Ford cars. Store the times into arrays called Chevy[ ] and Ford[ ]. Then list the winner of each pair, giving the number of seconds the winner won by. At the end declare which team won based on which team had the most wins. Below is a sample match.

Enter the times for the Chevy cars: 5.4  7.2  4.0  9.1  5.8  3.9  6.2  8.1

Enter the times for the corresponding Ford cars: 5.8  6.9  3.9  9.2  5.8  3.8  6.0  8.5

And the winners are:

Chevy by 0.4 sec

Ford by 0.3 sec

Ford by 0.1 sec

Chevy by 0.1 sec

Tie !

Ford by 0.1 sec

Ford by 0.2 sec

Chevy by 0.4 sec

And the winning team is: F O R D !

  • Accept the racing times for each of the Chevy cars into the array Chevy[ ].
  • Accept the racing times for each of the Ford cars into the array Ford[ ].
  • Then declare the wining car for each race, giving the winning time in seconds.
  • If the times are identical, then declare the race was a tie.
  • Finally, declare which team won the match, assuming a tie is possible.

Be sure to think about the logic and design first (IPO chart, pseudocode, and flowchart), then code the Visual Basic program.

1-Variable List With Data Type

List all variables you will use (use valid variable names). Indicate whether the data type is string, integer, or decimal, and so on.

2-IPO Model

List the inputs, any processes/calculations, and outputs. Use the same valid variable names you used in Step 1.

3-Flowchart

Use MS Visio to create a flowchart. Paste the flowchart here, or attach it as a separate document. Use the same valid variable names you used in Step 1.

4-Pseudocode

Describe your solution using pseudocode. Use the same valid variable names you selected in Step 1.

Reference no: EM13810728

Questions Cloud

In hidebound militarism and round-robin carnage : In these day in hidebound militarism and round-robin carnage, where even that beloved ambassador of peace , the Dalai Lama says it may be necessary to counter terrorism with violence, it's fair to ask: is humanity doomed? Are we born for the battlefi..
What is the difference between a group and a team : What is the difference between a group and a team
Century american society and globalized economy : A description of at least 200 words about what do think a lawyer does, and what role a lawyer plays, and what role a lawyer should play, in the 21st century American society and globalized economy.
What subcultures are the most influential : What subcultures are the most influential within a law enforcement agency and what challenges exist with regard to police subcultures within a law enforcement agency
Create a solution algorithm that employs loops. : Given a simple problem that requires iteration, create a solution algorithm that employs loops. Given a simple problem that requires simple data structures, design, code, and test a solution algorithm that uses arrays
What were some of basquiat''s inspirations : 1) What were some of Basquiat's inspirations for his paintings? 2) How did Basquiat's paintings evolve during his short but prolific career? 3) What made Basquiat different from other artists of his generation? (Please cite evidence from the document..
The use of performance enhancing drugs : An opposition research paper on the use of performance enhancing drugs in major league baseball. How come they use it, what factors benefit ticket sales, what do crowds want to see in a game. need 5 resources APA citation.
Rationale for identified target population : Rationale for identified target population
Socially responsible investments in the northwest : Heres a bit of background information we didnt cover in our phone conversation KMS Financial Services, Inc. has been in business since 1971 and is one of the largest Northwest based independent investment firms we offer one of the widest selections o..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Construct an entity-relationship model for the database

Construct an entity-relationship (ER) model for the database. Make sure you include in your model details of entities, relationships, attributes, keys and limits in participation.

  A local company owns three 3d printers

A local company owns three 3D printers installed in its three different branches. Clients can call the company and reserve the use of one printer for some hours.

  The warehouses the firm supplies retail outlets

DSS Inc. is an electronics company with production facilities located in Atlanta, Boston, and Chicago. Components produced at these facilities may be shipped to the firm's regional warehouses that are located in Edison and Fargo. From the warehouses ..

  What queue model is this

What queue model is this, Is the system stable, What is the total delay experienced by a customer in this system, from the moment it arrives until it is served?

  Determine the route from new york to los

Determine the route from New York to Los - Angeles that uses the minimum amount of gas.

  Infinite number of optimal dynamic-priority scheduling algo

Show that there exist an infinite number of optimal dynamic-priority scheduling algorithms. (Hint: Use the fact that both EDF and LLF are optimal).

  Design a property database using microsoft access

Database window opens, then type the word Client as the name for this file where the cursor is blinking, then click the create bottom.

  Create a recursive backtracking solution

The columns and rows of the matrix are the regions while the cells contain a 0 if the two regions are not adjacent and a 1 if they border. Create a recursive backtracking solution which accepts as interactive input from the user the number of regi..

  Complications in a time sharing system

Determine what complications could happen in a time-sharing system if two processes need access to the same file at the same time?

  An embedded system is a computer system performing

an embedded system is a computer system performing dedicated functions within a larger mechanical or electrical system.

  Design a representation of display screen

Create a form that lists possible potatoes and toppings in a manner that is easy for counter servers and kitchen crew to scan, and can also be used as input for the inventory reorder system.

  Creating two arrays of integers

Prepare two arrays of integers, each holding 10-elements of data. Make a third array of integers for a result array. The main program will take the 2-arrays of integers and pass them to the function subtract().

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd