Starting Out With Visual Basic (8th Edition)
Starting Out With Visual Basic (8th Edition)
8th Edition
ISBN: 9780135204658
Author: Tony Gaddis, Kip R. Irvine
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 6PC

Sailboat Race Ranking

Programming Challenge 7 in Chapter 3 asked you to create an application that tracks the performance of sailboats in five races. That version of the application only calculated the total points for each boat. In this new version, you are asked to rank the boats, assigning them first, second, and third place. Also, you will need to perform the following input validations:

  1. 1. All input values must be valid integers.
  2. 2. In any column (a single race), the three integers must add up to 6 (1 + 2 + 3, in any order). We assume there are no tie scores.

When one of these input validations fails, display an appropriate message in the status bar. You do not need to customize the message for each input field, but you must explain the nature of the error (nonnumeric, or duplicate values for a single race). Figure 4-37 shows a sample of the program as the user is entering values, and has incorrectly entered the rankings for Race #1. If all inputs are correct, display the rankings, as shown in the sample in Figure 4-38. It is possible for two or more boats to have the same total race score. In that case, display the word "TIE" on the status bar, and turn the font color for all three scores to the color Red. An example of tie scores is shown in Figure 4-39.

NOTE: There are six ways of arranging the rankings of three sailboats, so your nested IF statement must be able to create these arrangements. The arrangements are: (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1).

Figure 4-37 Validating user input, Sailboat Race Ranking program

Chapter 4, Problem 6PC, Sailboat Race Ranking Programming Challenge 7 in Chapter 3 asked you to create an application that , example  1

Figure 4-38 Sample output for the Sailboat Race Ranking program

Chapter 4, Problem 6PC, Sailboat Race Ranking Programming Challenge 7 in Chapter 3 asked you to create an application that , example  2

Chapter 4, Problem 6PC, Sailboat Race Ranking Programming Challenge 7 in Chapter 3 asked you to create an application that , example  3

Figure 4-39 Sailboat Race Ranking with tied scores

Chapter 4, Problem 6PC, Sailboat Race Ranking Programming Challenge 7 in Chapter 3 asked you to create an application that , example  4

Blurred answer
Students have asked these similar questions
""" MovieGuide.py This program allows each theater patron to enter a value from 0 to 4 indicating the number of stars that the patron awards to the Guide's featured movie of the week. The program executes continuously until the theater manager enters a negative number to quit. At the end of the program, the average star rating for the movie is displayed. """ # Initialize variables. totalStars = 0 # total of star ratings. numPatrons = 0 # keep track of number of patrons averageStars = 0 numStars = 0 # Get input. numStarsString = input("Enter rating for featured movie: ") # Convert to double. numStars = float(numStarsString) # Write while loop here while numStars >= 0 and numStars <= 4: numPatrons = numPatrons + 1 # incrementor totalStars = totalStars + numStars # Get input. numStarsString = input("Enter rating for featured movie: ") # Convert to double. numStars = float(numStarsString)   # Calculate average star rating averageStars - totalStars / numPatrons print("Average…
Random Number Guessing Game Create an application that generates a random number in the range of 1 through 100 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” If the user guesses the number, the application should congratulate the user and then generate a new random number so the game can start over. Optional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.
Flowchart for student interface program please. Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final…

Chapter 4 Solutions

Starting Out With Visual Basic (8th Edition)

Ch. 4.8 - Convert the following If Then Elself statement...Ch. 4.10 - Prob. 4.12CPCh. 4.10 - Prob. 4.13CPCh. 4.10 - Write a Boolean expression that equals true when a...Ch. 4.10 - Prob. 4.15CPCh. 4.10 - Prob. 4.16CPCh. 4 - A (n) _______structure allows a program to execute...Ch. 4 - A (n) _______operator determines if a specific...Ch. 4 - Boolean expressions can only be evaluated as_____...Ch. 4 - A (n)_______is a Boolean variable that signals...Ch. 4 - Prob. 5FIBCh. 4 - Prob. 6FIBCh. 4 - A(n)________ If statement is an If statement that...Ch. 4 - _______operators connect two or more relational...Ch. 4 - Prob. 9FIBCh. 4 - Prob. 10FIBCh. 4 - Prob. 11FIBCh. 4 - Prob. 12FIBCh. 4 - Prob. 13FIBCh. 4 - Prob. 14FIBCh. 4 - Prob. 15FIBCh. 4 - Prob. 16FIBCh. 4 - Prob. 17FIBCh. 4 - Prob. 18FIBCh. 4 - ________ is the process of inspecting input values...Ch. 4 - Prob. 20FIBCh. 4 - Prob. 21FIBCh. 4 - Prob. 1TFCh. 4 - T F: It is not possible to write Boolean...Ch. 4 - Prob. 3TFCh. 4 - T F: Clicking on a radio button selects it and...Ch. 4 - T F: Radio buttons that are placed inside a group...Ch. 4 - Prob. 6TFCh. 4 - Prob. 7TFCh. 4 - Prob. 8TFCh. 4 - Prob. 9TFCh. 4 - Prob. 10TFCh. 4 - Prob. 1MCCh. 4 - This statement can cause other program statements...Ch. 4 - Prob. 3MCCh. 4 - This statement is like a chain of If statements....Ch. 4 - When placed at the end of an IfThenElself...Ch. 4 - When an If statement is placed inside another If...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - Prob. 9MCCh. 4 - This operator connects two Boolean expressions...Ch. 4 - When determining whether a number is inside a...Ch. 4 - When determining whether a number is outside a...Ch. 4 - Prob. 13MCCh. 4 - This method attempts to convert a value to...Ch. 4 - Prob. 15MCCh. 4 - Describe the difference between the If Then ...Ch. 4 - In an IfThenElseIf statement, what is the purpose...Ch. 4 - What is a flag and how does it work?Ch. 4 - Briefly describe how the And operator works.Ch. 4 - Briefly describe how the Or operator works.Ch. 4 - How is the Xor operator different from the Or...Ch. 4 - Prob. 7SACh. 4 - How is the OrElse operator different from the Or...Ch. 4 - Why are the relational operators called...Ch. 4 - Prob. 2WDTCh. 4 - Why does Visual Studio automatically indent them...Ch. 4 - Prob. 4WDTCh. 4 - Prob. 1FTECh. 4 - Prob. 1AWCh. 4 - Write an IfThen statement that assigns 0 to intX...Ch. 4 - Write an IfThen statement that multiplies...Ch. 4 - Prob. 4AWCh. 4 - Write an IfThen statement that sets the variable...Ch. 4 - Write an IfThenElse statement that assigns 1 to...Ch. 4 - The string variable strPeople contains a list of...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Prob. 10AWCh. 4 - Prob. 1PCCh. 4 - Roman Numeral Converter The Roman Numeral...Ch. 4 - Fat Percentage Calculator Create an application...Ch. 4 - Weekly Temperatures with Validation Programming...Ch. 4 - Software Sales Software companies often offer...Ch. 4 - Sailboat Race Ranking Programming Challenge 7 in...Ch. 4 - Pay Per Click Advertising Revenue Many Web sites...Ch. 4 - Speed of Sound The following table shows the...Ch. 4 - Prob. 9PCCh. 4 - Name Formatting Create an application that lets...Ch. 4 - Prob. 11PCCh. 4 - Museum Tours Write a program that lets the user...Ch. 4 - Prob. 13PCCh. 4 - Mass and Weight Scientists measure an objects mass...Ch. 4 - Book Club Points Serendipity Booksellers has a...Ch. 4 - Body Mass Index Program Enhancement In Programming...Ch. 4 - Magic Dates The date June 10, 1960, is special...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY