
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
thumb_up100%
make a
make an appropriate function for taking the basic information like enrollment number, name and email from user. In addition, make another function to append the data to a text file on hard disk. Furthermore, there should be a function which displays the content of the file on console.
In the main function create objects of the above class and call the appropriate functions to add information of a student, store it in a file and display on the console
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 3 images

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 object-oriented principles, write a C++ program that will analyze a year's worth of rainfall data. Within the class, create a private member function called getData that will read in the data from an input file called rain2019.txt. This file contains the total rainfall for each of the 12 months. Read the contents of this file into a float array. The class should have four private member functions that compute and return totalRainfall, averageRainfall, driestMonth, and wettestMonth. The last two private member functions return the number of the month with the lowest and highest rainfall amounts, not the amount of rain that fell in those months. Notice that the month number can be used to obtain the amount of rain that fell those months. Create a private member function called displayReport that will print a summary rainfall report similar to the following (NOTE: this is only an example of format, not accurate data): 2019 Rain Report for Alachua County Total rainfall: 34.19…arrow_forwardWrite C++ program that will read student records from a data file and sort the contents.Declare a class to describe a student record with private fields for: first name last name student id declared major grade point average date of birth Use appropriate data types, constructor(s), and accessor methods.Do not hard-code values. The comma-separated value (CSV) text data file students.csv is provided for development and testing. Other data files may also be used. These will have the same fields with an arbitrary number of records.After the file is read, and the data stored in memory, write a message to the console indicating how many records were read. xx records read. Prompt the user to select the sort criterion field Sort by: (L)ast name, (S)tudent Id, (M)ajor, (G)PA, (A)ge, or (Quit) Read the single-character user selection. Sort the data records using a selection sort method. Print the sorted data records to the console using a toString() method from the class that you created.…arrow_forwardC++ Language 2arrow_forward
- Written in Python It should have an init method that takes two values and uses them to initialize the data members. It should have a get_age method. Docstrings for modules, functions, classes, and methodsarrow_forwardDO IT IN C++arrow_forwardIn C++ PLEASE Use the text file from Chapter 12, forChap12.txt. SEE BELOW Write a program that opens a specified text file then displays a list of all the unique words found in the file. Addition to the text book specifications, print the total of unique words in the file. Text File = forChap12.txt No one is unaware of the name of that famous English shipowner, Cunard. In 1840 this shrewd industrialist founded a postal service between Liverpool and Halifax, featuring three wooden ships with 400-horsepower paddle wheels and a burden of 1,162 metric tons. Eight years later, the company's assets were increased by four 650-horsepower ships at 1,820 metric tons, and in two more years, by two other vessels of still greater power and tonnage. In 1853 the Cunard Co., whose mail-carrying charter had just been renewed, successively added to its assets the Arabia, the Persia, the China, the Scotia, the Java, and the Russia, all ships of top speed and, after the Great Eastern, the biggest ever…arrow_forward
- For this task, you are to write code that handles the transfer of virtual coins between players in a video game. Instructions As this task relates to tranferring coins between players, a Player class has been provided, which supports adding and subtracting coins. Also provided is an interactive loop for testing the transfer of coins between players. Part A You are to write a function called transfer_coins with three parameters: the number of coins to transfer, the player from which coins will be taken (the "giver"), and the player which the coins will be given to (the "receiver"). It should use the appropriate instance methods on each of the player objects to update them as required. Part B If you tested your solution thoroughly in the previous part, you probably came across a logic error in the program---there's nothing to stop us from taking more coins from a player than they have! You are to fix this problem by raising an exception instead of completing the…arrow_forwardI need this done in C++ please! This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that is displayed by this program. This program is meant to replace the flight status report program (Programming Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file token wise.arrow_forwardIn C++ Please: The class and functions need to be on an .h file while the main needs to be small and on a seperate .cpp file. Create a class AccessPoint with the following attributes: x - a double representing the x coordinate y - a double representing the y coordinate range - an integer representing the coverage radius status - On or Off Add constructors. The default constructor should create an access point object at position (0.0, 0.0), coverage radius 0, and Off. Add accessor and mutator functions: getX, getY, getRange, getStatus, setX, setY, setRange and setStatus. Also, add a set function that sets the location coordinates and the range. Add the following member functions: move and coverageArea. Add a function overlap that checks if two access points overlap their coverage and returns true if they overlap. Add a function signalStrength that returns the wireless signal strength as a percentage. The signal strength decreases as one moves away from the access point location. Test…arrow_forward
- Write C++ program that will read student records from a data file and sort the contents.Declare a class to describe a student record with private fields for: first name last name student id declared major grade point average date of birth Use appropriate data types, constructor(s), and accessor methods.Do not hard-code values. The comma-separated value (CSV) text data file students.csv is provided for development and testing. Other data files may also be used. These will have the same fields with an arbitrary number of records.After the file is read, and the data stored in memory, write a message to the console indicating how many records were read. xx records read. Prompt the user to select the sort criterion field Sort by: (L)ast name, (S)tudent Id, (M)ajor, (G)PA, (A)ge, or (Quit) Read the single-character user selection. Sort the data records using a selection sort method. Print the sorted data records to the console using a toString() method from the class that you created.…arrow_forwardPut the class definition in House.h and the implementation of the constructors and functions in House.cpp 1. Define a class called "House", that represents the information of a house. A House is defined with these attributes: age (int), type (string) (for example Detached, Semi-Attached, Attached) and build_cost (double). Functions of the House class must perform the following operations: ✓ A default constructor which sets all the numeric instance variables to zero and the String instance variables to empty String. ✓ A constructor with 3 parameters which sets the 3 instance variables to the corresponding values passed. ✓ Implement a getter function for each of the 3 instance variables that will return the value of the instance variable. For example, the getX() function for the instance variable type must be called getType(). ✔ Implement a setter function for each instance variable that will assign to the instance variable to the value passed. For example, the setX() function for the…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education