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
C++
In this exercise, we learning the concept of abstract data type (ADT).
- Create a structure. Name it Employee.
- In the Employee structure, keep 3 information about the employee. His/her name (string), numbers of hour worked (int), and his/her pay rate (float).
- Inside the main function create an array of struct Employee, keep the size of the array 3 to keep the simplicity of the program.
- As a first employee, assign your information.
- For second and third employee, ask all the information from the user.
- Then display all the information of these three employees with a calculated gross pay.
- Then compare the name of all three employees and show if their names are same.
- If none of the name is same, must show then don’t have any employees with the same name.
I am adding 3 sample output for better understanding. Feel free to design your output in your way.
Note: Don’t create separate data for all the employee. You must create struct Employee. Don't forget the command cin.ignore().
Sample Output:
see attached images
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 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
- What do you specifically mean when you refer to something as an abstract data type?arrow_forwardWrite a structure called Point that has two member integer variables called x and y. Write a function that accepts a point and displays it in the form (x, y). For example if the x coordinate is 5 and y coordinate is 7, it should display the point as (5, 7) on the monitor. Write a function called readPointValues that gets the address of a point and use pointer notations to read values x and y into the point. Write a function to find the distance between two points. Write the main program to test all these functions. C languagearrow_forwardUSE C++ PLEASE Q#1 Using the concept of classes, constructors and data structure (arrays or any under data structure) implement a detailed University and student enrollment system. Each department of university has a separate class and perform every functionality with in a class. Create a main class where methods of other classes will be called.arrow_forward
- Please answer in Programming C++ Define a structure called Class with name (string), units (int) and grade (char) as its member data. Define a structure called Student with ID (int), name (string), num (int), gpa (double) and an array of maximum of 20 Class structures called classes, where ID is a 5 digit number, name is the student's full name, num is the number of classes taken so far and gpa is the current grade point average and classes is all the classes taken so far. Write a function called get_info which takes an array of Student structures called students and array size, reads all the information for as many students as the user wants to enter except for the gpa which is later calculated, storing them in students array. It then returns the number of students entered by the user before quitting. The user indicates the end of data entry by entering -99 for the ID of a student. The user must enter as many classes for each student as indicated by num - number of classes. Write a…arrow_forwardStructures The circle has two data members, a Point representing the center of the circle and a float value representing the radius as shown below. typedef struct{ Point center; float radius; }Circle; Make a c project sorting it into main.c circle.h, circle.c and implement the following functions: a. float diameter(Circle circ); //computes the diameter of a circle. b. float area(Circle circ); //computes for area of a circle c. float circumference(Circle circ);//computes for the circumference of a circle. Also add the basic functiona: initCircle(), createCircle() and displayCircle()arrow_forwardWrite a C program that uses a structure array to hold contact information for your friends. The program should allow the user to enter up to five friends and print the phone book’s current entries. Create functions to add entries in the phone book and to print valid phone book entries. Do not display phone book entries that are invalid or NULL.arrow_forward
- What do you specifically mean when you refer to something as an abstract data type?arrow_forwardWrite C++ Code to create an array of 20 occurrences of the below Cellphone class. Using the set function written below, set the price of the first cellphone ocurrence in the array to 700.00. class Cellphone{private:string manufacturer, model;int year;double price;public:Cellphone(){manufacturer = " ";model = " ";year = 2000;price = 0.0;}; // member functions double getPrice() {return price;} void setPrice(double p) {if(p < 0)price = 0;elseprice = p;}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