This website uses cookies to ensure you have the best experience. Learn more

Lab Assignment

430 words - 2 pages

Lab Assignment No. 5
Topic: Inheritance


Write a program called bookstore.cpp that can read information of book, CDMusic, and DVDMovie from keyboard and then display all the information by its type: book, CDMusic, and DVDMovie.


Create a base class called Publication. The Publication class contains two member data:
* title as an array of characters
* price as float
It also contains two member functions:
* GetData() reads title and price from the keyboard.
* DisplayData() displays title and price.

Create a derived class called Book. The Book class is derived from Publication class. It contains the page_number as an ...view middle of the document...

Create a derived class called DVDMovie. The DVDMovie class is derived from Publication class. It contains the rating as an array of characters. It also contains two member functions:
* GetData() reads the rating type from the keyboard.
* DisplayData() displays the rating type.

In the main routine, the program will ask for the item type and then reads the information about each item based on selected type from the keyboard. The user may enter any order. The program will display all the information grouped by their respective type: books, CD, and DVD.

To make inheritance work properly, you must declare the objects of derived class. The member functions of derived class will activate the member functions from its base class.

Be sure to include block documentation to describe the purpose of each class and each function.

Note: In order to count for grade, you must design and use inheritance as described above.
Please use the test data below to submit your screen shots.

Title: The World War I
Price: $20.25
Page: 450

Title: The Four Seasons
Price: $8.99
Playing Time: 76.20 minutes

Title: A Bug’s Life
Price: $18.99
Rating: G

Title: Shrek
Price: $20.99
Rating: PG

Title: The Art of French Horn
Price: $10.89
Playing Time: 69.25 minutes

Title: A History of English Speaking People
Price: $60.00
Page: 1700

For your I/O screen shots, please show all the data you entered like my sample screen shots.

The I/O screen shots should look like the following sample:

Other assignments on Lab Assignment

Biology Essay

364 words - 2 pages Student Sheet Name: Nitra Williform Date: 5/20/2016 Instructor's Name: Hannah Gocinski Assignment: SCIE207 Phase 4 Lab Report Part 2 Title: Exploring Endocrine, Circulatory, and Respiratory Systems Instructions: Your lab report from Part 1 along with the Part 2 activity will serve as a guide to answer the questions and to complete the tables for the endocrine, cardiovascular (circulatory), and respiratory systems. When your lab report

Lab 6 Of 6: Staying Current And Troubleshooting Windows Xp

685 words - 3 pages Week 7 Lab Lab Title: Lab 6 of 6: Staying Current and Troubleshooting Windows XP Prepare this Lab Report when you have completed and lab assignment. Include any charts, graphs required to complete the lab. Refer to your initial lab plan to respond to the first questions. 1. Define the problem you were solving in this lab. (If any) • Part A: You are to apply the latest service pack for Microsoft Windows XP and download at least two hot

Academic And Professional Success

429 words - 2 pages of the assignment first. I chose this section first since I thought it would be my stronger section. I then went on to the writing section and then last did the math section since I thought this would be my toughest section. I really enjoyed completing these assignments in the My Foundations Lab. It gave me a sense of where I was and what I needed to work on and really was a big refresher for me. I like the process it takes of letting you

Virtual Chemistry

692 words - 3 pages Boiling Point Elevation 4-4 Boiling Point Elevation If you dissolve a substance such as ordinary table salt (NaCl) in water, the boiling point of the water will increase relative to the boiling point of the pure water. In this assignment, you will dissolve a sample of NaCl in water and then measure the boiling point elevation for the solution. 1. Start Virtual ChemLab and select Boiling Point Elevation from the list of assignments. The

Hrm Ojt Weekly Report

598 words - 3 pages assignment and experience...13 Values... Premium Ojt Narrative Essay For Hrm Student My Community Liceo de Cagayan mission and vision and Core values have a big effect or impact to my community because this serves a guide to those people who are... Premium Problem Encountered By An Hrm Students In Their On The Job Training during their local on the job training. The respondents of the study were fifty students from Hotel and Restaurant Management

Jai Ho

914 words - 4 pages For this assignment, you will create a Brand map for a product or service category. After the map is created, you will write a management report of the implications of the map. For this assignment, you will use BrandMap Software™ to construct your map. This software is available on all computers in the Schulich computer lab (Room S336). You will have to run your map in the lab as the software cannot be copied onto your personal computer

Nt 1210 Unit 1 Assignment

2960 words - 12 pages Unit 1 assignment 1. C 2. All of them are wrong the smallest measurement in the answers is a kilobyte and that is actually 1024 bytes not 106. 3. C 4. A,E 5. A 6. C 7. D 8. A 9. A,B,D 10. A 11. A 12. B,D 13. A,C 14. A,D 15. A 16. D 17. B 18. C 19. C,D 20. A,B Lab 1.1 Exercise 1.1.1 103 > 1000 x 2 = 2000 102 > 100 x 9 = 900 101 > 10 x 3 = 30 100 &gt

Data Base Esign

483 words - 2 pages Stephen Favor (CPD121) Assignment Lab 2-3 TR10 1. What is an entity? * An entity is something about which we want to keep data. There are physical entities; something physical in our universe (e.g., a person, place, thing, etc.). There is also a logical entity; something non-physical (e.g., a relationship).Three examples of an entity could be a gun, Airline, and a camera. 2. What is a relationship? * A relationship is a logical

History Of Community Health

1416 words - 6 pages   * Assignment  * Reference  * Feedback We'd like to hear from you!Feedback often challenges educators and students to change the way that they express ideas, or change what they express or change the way that they think. We need your feedback on how this experiment and virtual lab feels to you as it will help us perceive your experience. Also, a simple note on who you are and what you do in addition will help us put your valuable feedback in


1629 words - 7 pages LP Assignment This assignment will not be collected for a grade as it is the last assignment immediately prior to the exam. Problems LP1, LP2, LP3, LP4, and B.10 are to be solved by the manual graphical method using an iso-Z line to either maximize or minimize the objective function whichever is appropriate. LP1 The Really Big Shoe (RBS) is a manufacturer of basketball and football shoes. Ed must decide the best way to spend

Sales Tracking And Customer Relations Analyses

2311 words - 10 pages tutorials). This assignment is worth 30% of total marks for this course and will be marked on: * your demonstrated understanding of the problems; * completeness of the tasks; * exploration of the features in Microsoft Office; and * quality of the submission (Excel workbook & Word document). Assignment checkpoints: During your lab classes in weeks 7 to 11 you may be asked by your tutors to show evidence of your consistent

Similar Documents

Scie211 Phase 2 Lab Report

343 words - 2 pages Name: Date: Instructor’s Name: Assignment: SCIE211 Phase 2 Lab Report Title: Speciation Instructions: You will need to write a 1-page lab report using the scientific method to answer the following question: • What would happen if a species within a population were suddenly split into 2 groups by an earthquake that creates a physical barrier like a canyon? When your lab report is complete, post it in Submitted Assignment

Scie211 Phase 2 Lab Report

350 words - 2 pages Name: Date: Instructor’s Name: Assignment: SCIE211 Phase 2 Lab Report Title: Speciation Instructions: You will need to write a 1-page lab report using the scientific method to answer the following question: • What would happen if a species of lizards were suddenly split into 2 groups by a hurricane, resulting in isolation of a small group of individuals on an island far from the mainland? When your lab report is complete

Is And Work Group Essay

951 words - 4 pages Course Schedule Session 1 (January 12, 2013) Module 1 Topic The Accounting Environment: What is Accounting and Why is it Done? Activities Readings: Chapter 1 LO 1, 2, 3, 4, 5, 6 pages 1 - 23 Assignments: Lyryx Online Homework Assignment: Lab 1, Chapter 1 E1-3 (LO 2), E1-8 (LO 6) P1-6 (LO 1,2), P1-9 (LO1, 2, 6) P1-13 (LO 6), P1-16 (LO 1,2, 3) Due by Sunday, January 20 at 11:00 pm Tests/Exams: (None) Session 2 (January 19

Human Impacts On The Sustainability Of Groundwater

420 words - 2 pages Name: Tenika J Tassin Date: April 11, 2016 Instructor’s Name: Denise Albina Assignment: SCI203 Phase 1 Lab Report Title: Human Impacts on the Sustainability of Groundwater Instructions: You will need to write a 1-page lab report using the scientific method to answer the following question: * If current human development does not change, will groundwater sustainability be affected? When your lab report is complete – submit