Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 10, Problem 8AW
A file exists on the disk named students.dat. The file contains several records, and each record contains two fields: (1) the student's name, and (2) the student’s score for the final exam. Design an
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A file exists on the disk named students.dat. The file contains several records, and eachrecord contains two fields: (1) the student’s name, and (2) the student’s score for the final exam.Design an algorithm that changes Julie Milan’s score to 100.
No files need to be provided , the file foo is just an example.
Create a new text file using a notepad or any other software, The text file contains your name(first 8 chars) and the file must be exactly 8 bytes in size only and name it “your_ID.txt”.
Chapter 10 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Ch. 10.1 - Where are files normally stored?Ch. 10.1 - What is an output file?Ch. 10.1 - What is an input file?Ch. 10.1 - What three steps must be taken by a program when...Ch. 10.1 - Prob. 10.5CPCh. 10.1 - Prob. 10.6CPCh. 10.1 - When writing a program that performs an operation...Ch. 10.1 - In most programming languages, if a file already...Ch. 10.1 - What is the purpose of opening a file?Ch. 10.1 - What is the purpose of closing a file?
Ch. 10.1 - Prob. 10.11CPCh. 10.1 - Prob. 10.12CPCh. 10.1 - What is a files read position? Initially, where is...Ch. 10.1 - In what mode do you open a file if you want to...Ch. 10.2 - Prob. 10.15CPCh. 10.2 - What is the purpose of the eof function?Ch. 10.2 - Is it acceptable for a program to attempt to read...Ch. 10.2 - Prob. 10.18CPCh. 10.2 - Which of the following loops would you use to read...Ch. 10.4 - Prob. 10.20CPCh. 10.4 - Prob. 10.21CPCh. 10.4 - Prob. 10.22CPCh. 10 - A file that data is written to is known as a(n) a....Ch. 10 - A file that data is read from is known as a(n) a....Ch. 10 - Before a file can be used by a program, it must be...Ch. 10 - When a program is finished using a file, it should...Ch. 10 - The contents of this type of file can be viewed in...Ch. 10 - This type of file contains data that has not been...Ch. 10 - When working with this type of file, you access...Ch. 10 - When working with this type of file, you can jump...Ch. 10 - This is a small holding section in memory that...Ch. 10 - Prob. 10MCCh. 10 - This is a character or set of characters that...Ch. 10 - This marks the location of the next item that will...Ch. 10 - When a file is opened in this mode, data will be...Ch. 10 - The expression NOT eof (myFi1e) is equivalent to...Ch. 10 - This is a single piece of data within a record. a....Ch. 10 - When working with a sequential access file, you...Ch. 10 - In most languages, when you open an output file...Ch. 10 - The process of opening a file is only necessary...Ch. 10 - Prob. 4TFCh. 10 - Prob. 5TFCh. 10 - When a file that already exists is opened in...Ch. 10 - In control break logic, the program performs some...Ch. 10 - Describe the three steps that must be taken when a...Ch. 10 - Why should a program close a file when its...Ch. 10 - What is a files read position? Where is the read...Ch. 10 - If an existing file is opened in append mode, what...Ch. 10 - In most languages, if a file does not exist and a...Ch. 10 - What is the purpose of the eof function that was...Ch. 10 - What is control break logic?Ch. 10 - Design a program that opens an output file with...Ch. 10 - Design a program that opens the my_name.dat file...Ch. 10 - Prob. 3AWCh. 10 - Design an algorithm that does the following: opens...Ch. 10 - Modify the algorithm that you designed in question...Ch. 10 - Write pseudocode that opens an output file with...Ch. 10 - Prob. 7AWCh. 10 - A file exists on the disk named students.dat. The...Ch. 10 - Why doesn't the following pseudocode module work...Ch. 10 - File Display Assume that a file containing a...Ch. 10 - Item Counter Assume that a file containing a...Ch. 10 - Sum of Numbers Assume that a file containing a...Ch. 10 - Average of Numbers Assume that a file containing a...Ch. 10 - Largest Number Assume that a file containing a...Ch. 10 - Golf Scores The Springfork Amateur Golf Club has a...Ch. 10 - Sales Report Brewster's Used Cars, Inc. employs...Ch. 10 - Lowest and Highest Gas Prices Assume that you have...Ch. 10 - Average Steps Taken A Personal Fitness Tracker is...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Explain what can be done with primary keys to eliminate key ripple effects as a database evolves.
Modern Database Management (12th Edition)
Describe a method that can be used to gather a piece of data such as the users age.
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Self-Test Exercise 18 asked you to overload the operator and the operator for a class Percent. Complete and t...
Problem Solving with C++ (9th Edition)
Challenge exercise Modify the getLoginName method of Student so that it always generates a login name, even if ...
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Why is the study of database technology important?
Database Concepts (7th 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
- Create a program named FileComparison that compares two files. First, use a text editor such as Notepad to save your favorite movie quote. Next, copy the file contents, and paste them into a word-processing program such as Word. Then, write the file-comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a files size, you can create a System. 10. Filelnfo object using statements such as the following, where FILE_NAME is a string that contains the name of the file, and size has been declared as an integer: FileInfo fileInfo = new FileInfo(FILE_NAME); size = fileInfo.Length;arrow_forwardWHATS THE ALGORITHIM FOR THIS The course records are shown below: Each student has 4 assignments. 108194 9 10 10 10 197526 10 10 10 10 197008 10 10 0 10 197746 10 10 9 10 108154 10 0 10 9 Create an input file ‘CSassignments.txt’ using an editor such as Notepad++ with a student number, then a space, then four assignment marks on one line. The assignment marks are whole numbers and are separated by a space. Your C++ program will read from the file ‘CSassignments.txt’ and write to a second file ‘CSgrades.txt’ which includes the average of the student’s four assignments. e.g. 108194 9 10 10 10 9.75 Your C++ program should work with any number of records in the ‘CSassignments.txt’ input file – that is –…arrow_forwardStudents who take a course have school numbers and integer midterm grades over 100 “student.the text (text) named ”dat" is stored in a file. Write down the grade where there is an accumulation in the classroom (the number of grades with the highest frequency, or in other words, the number of grades with the highest number) and the program that writes the numbers of students who have received this grade on the screen. AN EXEMPLARY Student.dat (CREATE THIS FILE USING NOTEPAD!!!!)arrow_forward
- In Python Language do the following:The Springfork Amateur Golf Club has a tournament every weekend. The club president hasasked you to write two programs:1. A program that will read each player’s name and golf score as keyboard input, then savethese as records in a file named golf.txt. (Each record will have a field for the player’sname and a field for the player’s score.)2. A program that reads the records from the golf.txt file and displays them.arrow_forwardusing java Write a program that allows the user to enter name and phone number. Have the program accept input until ZZZ is entered for name. Output each record that contains name and phone number to a file called directory.txt. Write a program that will read the above directory.txt file and print its content on screen.arrow_forwardNeeds to be written in java using Scanner for user input: Write a program that allows the user to enter name and phone number. Have the program accept input until ZZZ is entered for name. Output each record that contains name and phone number to a file called directory.txt. Write a program that will read the above directory.txt file and print its content on screen.arrow_forward
- PLEASE GIVE ME THE ANSWER IN PYTHON language, please. I have asked for that in the last 3 questions and they answer in a different incorrect language. I apologize for starting off like that but could you please help me with the below. def display_averages_and_totals(self):try:with open ("HowManyHours.txt", "r") as file:#read data from filedata = file.readlines()total_credits = 0total_study_hours = 0except FileNotFoundError:print("HowManyHours.txt is not found.") for student in self.students:total_credits += student.creditstotal_study_hours += student.study_hoursaverage_credits = total_credits/ len(self.students)average_study_hours = total_study_hours/ len(self.students) print("Study Hours Report")print(f"Created for{self.report_for},{self.report_employee_id}")print(f"Department:{self.report_department}")print(f"Created By: {self.creator},{self.employee_id}")print(f"Department:{self.department}}")print(f"Total Students: {len(self.students)}")print(f"Average Credits:…arrow_forwardWrite a test_book.py file. Complete the following tasks. A . Create 2 book objects with the following information “Get Started with Python”, 66.99, 100 “Get Started with Visual Basic”, 55.99, 88 B. If you have sold 10 copies of “Get Started with Python”, call sell_copies() method of object to change the quantity of the book. Display the current quantity of book on screen to verify the information is correct. C. Use pickle to save the information of the 2 books in book.dat file. write the code in python please and thank youarrow_forwardDevelop a program for a Runner’s Club that will record the results of their recent marathon to a file. runner’s name (can just be first name) time in hours to complete the marathon Include a menu that will allow the user to add data to the file display all the data calculate and display the average time display the fastest run time exit the programarrow_forward
- Design 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_forwardProblem: Encode the file by adding 5 to every byte in the file. Write a program that prompts the useer to enter an input file name and an output file name and saves the encrypted version of the input file to the output file. I don't get any encrypted file. Why? package encrypt; import java.io.*;import java.util.*; public class Encrypt { public static void main(String[] args){ // Input from user Scanner input = new Scanner(System.in); System.out.print("Enter a file to encrupt:"); // Input file from user File inputfile = new File(input.nextLine()); System.out.print("Enter the output file:"); // Output file from user File outputfile = new File(input.nextLine()); try { // Create BufferedInputStream from bis BufferedInputStream bis = new BufferedInputStream (new FileInputStream(inputfile)); // Create BufferedOutputStream from bos…arrow_forwardWrite a python program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file will hold. Thanks so muck for your help!arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License