Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 11, Problem 5PE
Golf Score Modification
In
- (1) A program that reads each player’s name and golf score as keyboard input, and then saves these as records in a file named golf.dat.
- (2) A program that reads the records from the golf.dat file and displays them. Consolidate these programs into a single program that presents a menu, allowing the user to select the operation he or she wants to perform.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
phyton
Lap Timer Tool
Write a Python (GUI program) that asks the user to enter the number of times that they have run around a racetrack, and then uses a loop to prompt them to enter the lap time for each of their laps. When the loop finishes, the program should display the time of their fastest lap, the time of their slowest lap, and their average lap time.
Distance File Modify the Distance Calculator program that you wrote for Programming Problem 1 so it writes its output to a file instead of displaying it in a ListBox control. Open the file in Notepad or Visual Studio to confirm the output.
Chapter 11 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 11.1 - What is a menu-driven program?Ch. 11.1 - The items displayed in a menu are often preceded...Ch. 11.1 - What type of structure do you use in a program to...Ch. 11.3 - Explain why most menu-driven programs use a loop...Ch. 11.3 - If a program uses a loop to display a menu...Ch. 11.4 - Prob. 11.6CPCh. 11.4 - Prob. 11.7CPCh. 11.4 - When a program has a lot of items for the user to...Ch. 11 - Prob. 1MCCh. 11 - Prob. 2MC
Ch. 11 - If a menu-driven program uses a loop to redisplay...Ch. 11 - A program that uses a multiple-level menu displays...Ch. 11 - Prob. 5MCCh. 11 - When the user selects an operation from a...Ch. 11 - When the user selects an operation from a(n)...Ch. 11 - Prob. 1TFCh. 11 - It is not usually necessary to validate the user's...Ch. 11 - In most cases, a menu-driven program should be...Ch. 11 - If a menu-driven program does not use a loop to...Ch. 11 - In a single-level menu, the user might see a...Ch. 11 - What type of structure do you use in a program to...Ch. 11 - What ways for validating a users menu selection...Ch. 11 - How can you design a menu-driven program so that...Ch. 11 - When a program has a lot of items for the user to...Ch. 11 - Prob. 1AWCh. 11 - Design a case structure that can be used with the...Ch. 11 - Put the algorithms that you designed for questions...Ch. 11 - Look for ways to modularize the algorithm that you...Ch. 11 - Language Translator Design a program that displays...Ch. 11 - Prob. 2PECh. 11 - Prob. 3PECh. 11 - Astronomy Helper Create an application that...Ch. 11 - Golf Score Modification In Programming Exercise 6...Ch. 11 - Phone Book Program Design a program that you can...Ch. 11 - Prob. 7PE
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Name two different uses for the C++ operator.
Starting Out with C++: Early Objects (9th Edition)
Fill in the blanks in each of the following statements: A relation that has no partial functional dependencies ...
Modern Database Management
Describe the purpose of the access key attribute and how it supports accessibility.
Web Development and Design Foundations with HTML5 (8th Edition)
What is the purpose of closing a file?
Starting Out with Python (4th Edition)
The following method compiles and executes but does not work as you might hope. What is wrong with it? / Double...
Java: An Introduction to Problem Solving and Programming (8th Edition)
Knowledge Booster
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
- Using python language, make a program (refer to the image).arrow_forwardTranscribed Image Text Create a program that allows the user to do some basic functions. First, ask the user if they would like to find out sqrt, log or factorial of a number, then return the results. Here is the sample output: Welcome to the simple math helper. What would you like to calculate? 1. Sqrt 2. Log 3. Factorial > 1 Enter the number to sqrt: >9arrow_forwardThe condition that controls a Do While loop must be true for the loop to be executed. Checkboxes are used in designing the user interface for situations where the user may choose only one of a few choices. Boolean variables are often used to improve the readability / clarity of the program code. For Next loops can have both negative and positive step values. If no item has been selected in a listbox, the SelectedIndex property of the listbox will have a value of zero. A Boolean variable must be initialized after the If instruction in which it is used is executed. A post-test loop is a loop that is designed to be executed at least once. In coding a Select Case instruction, the only thing that may appear after the Select Case keywords is a variable. A Do loop begins with the keyword Do and ends with the keyword Loop. The condition that controls a Do Until loop must be true for the loop to be executed. Radio buttons are used in designing the user interface for situations where the user…arrow_forward
- Pythonarrow_forwardThe Spring fork amateur golf club has a tournament every weekend. The club president has asked you to design a program. It contains the following menu: Select the task 1. Add new records 2. Read Records 3. End the program If the user enters 1, the program will read each players name and golf score as keyboard input, then save the records in a file names golf.dat If the user enters 2, the program reads the records from the golf.dat file and displays them. While the menu selection is not equal to 3, get the user selection. If the selection is 1, get the number of players in the tournament, open the output file. For each player, get the name and the score, and write them to the file. Close the file. If the selection is 2, open the input file, read the values from the file, display the values, close the file. If the selection is 3, exit the program. I already had a code written from before, but I'm having a hard time turning it into a menu driven code. It does need to have the function…arrow_forwardA for statement is a loop that iterates across a list of items. As a result, it continues to operate as long as there are items to process. Is this statement true or false?arrow_forward
- Python The Springhill Amateur Golf Club has a tournament every weekend. The club president has asked you to write a Menu-Driven program which has the following functionality: 1. Allows for each player's name and golf score to be entered and saved in a text file named golf.txt. 2. Reads each player's name and golf score from the text file golf.txt and provides an average score. 3. The program will use one variable for the player's name and one variable for the score.arrow_forwardAverage Number of WordsIf you have downloaded the source code from the Computer Science Portal you will find a filenamed text.txt in the Chapter 08 folder. The text that is in the file is stored as one sentenceper line. Write a program that reads the file’s contents and calculates the average number ofwords per sentence.(You can access the Computer Science Portal at www.pearsonhighered.com/gaddis.)arrow_forwardVB Small Project 19 – Numbers From a File Using the program from Small Project 18, create a file that contain the numbers 5, 10, 15, 20, and 25. Write a Visual Basic program that reads those numbers from the file. Calculate the average of the numbers and print it. Name the text file this way: NameTextFile --- CooleyTextFilearrow_forward
- Monthly Sales Create a program that allows you to view and edit the sales amounts for each month of the current year. Example COMMAND MENU add - Add sales for specified month view - View sales for specified month edit - Edit sales for specified month totals - View sales summary for year exit - Exit program Command: add Three-letter Month: jan Sales Amount: 10317 Sales amount for Jan is 10,317.00. Command: add Three-letter Month: feb Sales Amount: 15293 Sales amount for Jan is 15,293.00. Command: view Three-letter Month: jan Sales Amount: 14317 Sales amount for Jan is 14,317.00. Command: edit Three-letter Month: jan Sales amount for Jan is 14,317.00. Command: totals Yearly total: 29,610.00 Monthly average: 14,805.00 Command: view Three-letter Month: july Invalid three-letter month. Command: exit Bye! Specifications The program should use a list to store the sales data for each month with the three-letter abbreviation for the month (Jan,…arrow_forwardMenu of the Day Create a program that filters and displays the correct menu items based on the day that the user enters. Console Menu of the Day COMMAND MENU Specify the day using the three-letter format (mon, tue, wed, thu, fri, sat, sun). Or, enter 'exit' to exit. Day: mon Roast beef 10 Potato soup 6 Baked cod 10 Day: tue Butter chicken 11 Lamb tikka 12 German forest cake 7 Day: exit Bye! Specifications A tab-delimited text file named menu.txt that contains the menu items for the current week is attached. Each item has a name (a string), price (an integer), and associated day (a string) Use a structure named MenuItem to store the name, price, and day for each menu item. When the program starts, it should load the items from the file into a vector of MenuItem objects. The user should be able to type a three-letter day code to display the menu items for the specified day. The user should be able to…arrow_forwardDesign an application that can be used to read DVD titles from a text file. You do not have to write to the file, only write code to read the titles of DVDs from a text file called DVD.txtarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Graphical User Interfaces: Crash Course Computer Science #26; Author: CrashCourse;https://www.youtube.com/watch?v=XIGSJshYb90;License: Standard YouTube License, CC-BY
Python GUI | How To Make A GUI In Python | Best GUI Framework In Python | Edureka; Author: edureka!;https://www.youtube.com/watch?v=_PHJvjQJa3w;License: Standard Youtube License