Free Essay

Lab Assignment

In: Computers and Technology

Submitted By apicante
Words 430
Pages 2
Lab Assignment No. 5
Topic: Inheritance

Instructions:

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.

Specifications:

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 integer. It also contains two member functions: * GetData() reads the page number from the keyboard. * DisplayData() displays the page number.

Create a derived class called CDMusic. The CDMusic class is derived from Publication class. It contains the playing time as float type. It also contains two member functions: * GetData() reads the length of playing time in minutes from the keyboard. * DisplayData() displays the length of playing time in minutes.

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.

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

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

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

DVD
Title: Shrek
Price: $20.99
Rating: PG

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

Book
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:

Similar Documents

Free Essay

Asttronomy Lab Assignment

...Lab 11 Assignment Part 1: Exploring the Moon I- How many Apollo missions were there and what years did they take place? 1. Apollo 1 on January 27, 1967 2. Apollo 7 on October 11, 1968 3. Apollo 8 on December 21, 1968 4. Apollo 9 on March 3, 1969 5. Apollo 10 on May 18, 1969 6. Apollo 11 on July 16, 1969 7. Apollo 12 on November 14, 1969 8. Apollo 13 on April 11, 1970 9. Apollo 14 on January 31, 1971 10. Apollo 15 on July 26, 1971 11. Apollo 16 on April 16, 1972 12. Apollo 17 on December 7, 1972 Apollo 2 and 3 (these were no craft named) Apollo 4 (Also called AS-501) on November 9, 1967. Apollo 5 (also called AS-204) on January 22, 1968. Apollo 6 (Also called AS-502) on April 4, 1968. There were 17 in total. II- How many of the missions orbited the Moon and how many landed? Which ones? * Apollo 8 and Apollo 10 orbited the Moon and returned. * Apollo 11, 12, 14, 15, 16 and Apollo 17 landed on the Moon. A total of 6. III- Unfortunately, there was an accident early on. Which mission was it? The mission that suffered a tragic accident was Apollo 1. Part 2: Venus I- How many Venera Missions (Russian) were there? Over what time period did these missions occur? Did any of the crafts actually land on the surface? What happened?...

Words: 1570 - Pages: 7

Free Essay

Lab Assignment 3

...Week 3 - Lab 3: Exploring Busses (computer and paper) Requirements 1. Label each type of port in the picture below: P/S 2 Ethernet Parallel Port HDMI Port IEEE Mouse Port Port 1394a Port P/S 2 Keyboard USB Ports Serial Port VGA Port Speakers Line In Microphone Port 2. Locate and print a picture of a: a. Secure Digital (SD) card or card reader b. Compact Flash (CF) card or card reader c. Micro Drive or reader d. Memory Stick or reader 3. Be sure to label each picture, and a flash drive is not the same as any of these devices. A. Secure Digital (SD) card B. Compact Flash (CF) card C. Micro Drive D. Memory Stick...

Words: 286 - Pages: 2

Free Essay

Csec630 Lab Assignment 2

...CSEC630 Lab Assignment 2 1. When running Snort IDS why might there be no alerts? It is possible that a user might not get any alerts while using Snort IDS. One reason could be that the user didn't set up the Snort with optimum settings. The user may have set it up on a port that is not been used by the network. Snort works by using a set of rules. The user can either download and use these rules from the Snort website with default settings, or can modify them to his/her network requirements and needs. By changing the default settings of the rules provided on the Snort website, there is a chance that the user might disable packet sniffing on a port that needs to be enabled, causing no alerts on that port. There is also a possibility that user may have set a range of ports to be scanned by Snort IDS for sniffing and the traffic that is coming in the network is not through any of those ports, muting the alerts. 2. If we only went to a few web sites, why are there so many alerts? An Intrusion Detection System (IDS) provides a wide range of monitoring techniques including packet sniffing, file integrity monitoring, and even artificial intelligence algorithms that detect anomalies in network traffic. Snort, a public domain intrusion detection system, monitors traffic by analyzing every packet on a network, looking for malevolent content....

Words: 1658 - Pages: 7

Premium Essay

Week 3 Lab Assignment

...GENERAL LEDGER APPLICATIONS USING PEACHTREE COMPLETE ACCOUNTING 2010 ®: The Winery At Chateau Americana LEARNING OBJECTIVES After completing and discussing this assignment, you should be able to: • Recognize the managerial and technological issues associated with the implementation of a general ledger package • Complete sample transactions • Understand the implications of the design of the user interface • Recognize and evaluate the strengths and weaknesses of controls embedded in a general ledger package • Compare and contrast a general ledger package with a manual accounting information system BACKGROUND As the winery has grown, Rob Breeden, the chief financial officer, has realized that management does not have timely information about the financial condition of the company. This has resulted in several instances in which the decisions made were not optimal. Therefore, he has determined that it is time to convert the current system to a general ledger package. After investigating the possibilities, he has decided to utilize Peachtree Complete Accounting 2010®. Chateau Americana has hired you to convert the system. REQUIREMENTS Using the Peachtree Complete Accounting 2010® software program contained in your CAST package or in your school computer lab, you are to convert Chateau Americana from a manual system to a general ledger software package....

Words: 3080 - Pages: 13

Free Essay

Prelab Assignment Lab 5

...● Understand the concept of scope ● Understand the difference between static, local and global variables ● Practice with functions that can return more than a value and whose parameters’ scopes are not local to the function ● Input validation These pre-labs are directly related to the lab activities. You don’t need to complete the program. What you need to do is to work on the logic and perhaps some key parts of each program and then complete them in the lab. Assigned: Date of your lab 4 Due: the night before lab 5 Questions Prelab activity for Lab 5A: Find the difference between two types of returning values. Implement the following function prototypes (which take hours of work as integer and the rate of pay as float and calculates the net-payment as float) on paper. Also, write a main function which calls both functions. Compare the calculated net values and show the proper message whether or not they match. Name your variables as hours, rate, and netPay. float calNetPay(int, float); void calNetPay2(float&, int, float); Also, answer the following questions: What does the operator & do? Create a table and put all of the variables of the program inside the first column. The second column should show the scope of each variable. For example for calNetpay2 function if you called the integer variables hours, its scope will be the function calNetPay2. Prelab activity for Lab 5B: Create a flowchart showing the following scenario: 1....

Words: 471 - Pages: 2

Premium Essay

Nt2580 Unit 3 Assignment & Lab

...NT2580 Unit 3 Assignment & Lab Unit 3. Assignment 1 - Remote Access Control Policy Definition There are three key parts I will have to take into account while designing a Remote Access Control Policy for Richman Investments. These three parts (Identification, Authentication and Authorization) will not be all for the Remote Access Control Policy, I will need to include the appropriate access controls for systems, applications and data access. I will also need to include my justification for using the selected access controls for systems, applications and data access. The first part I need to implement for this Remote Access Control Policy is Identification, which is defined in this sense as: physical keys or cards, smart cards, and other physical devices that might be used to gain access to something. What needs to be done for the Remote Access Control Policy is a group member policy needs to be setup which uniquely identifies each user. Users should be identified by rank with higher ranking users requiring more authentication. Each individual user should be assigned to a group based on rank with special permissions. Using this system for Identification will make our company more secure in day to day operations. The second part I need to implement for this remote access control policy is Authentication, which is defined as: what you know or passwords, numeric keys, PIN numbers, secret questions and answers....

Words: 477 - Pages: 2

Free Essay

Securing Linux Lab Assignment

...Week 3 Lab This lab consists of two parts. Make sure you label each section accordingly and answer all the questions. For this lab it is recommended that you review the Demo Lab presentations in the Unit 5 and Unit 6 Learning Space. Click the PRACTICE link > DEMO LAB > then click the hyperlink to launch the demonstration. Part #1 Apply Hardened Security for Linux Services & Applications Learning Objectives and Outcomes Upon completing this lab, students will learn about the following tasks: * Harden Linux server services when enabling and installing them, and keep a security perspective during configuration * Create an Apache Web Server installation and perform basic security configurations to assure that the system has been hardened before hosting a web site * Configure and perform basic security for a MySQL database, understanding the ramifications of a default installation and recommending hardening steps for the database instance * Install, setup and perform basic security configuration for Sendmail to be able to leverage the built-in messaging capabilities of the Linux System * Enable and implement secure SSH for encrypted remote access over the network or across the Internet of a Linux server system Overview This lab is an extension of the previous hands-on labs, and it incorporates security hardening for Linux services and applications loaded in the physical server....

Words: 2020 - Pages: 9

Free Essay

Bsop 434 Week 7 Lab Assignment

...BSOP 434 WEEK 7 LAB ASSIGNMENT To purchase this visit here: http://www.activitymode.com/product/bsop-434-week-7-lab-assignment/ Contact us at: SUPPORT@ACTIVITYMODE.COM BSOP 434 WEEK 7 LAB ASSIGNMENT: WAREHOUSING AND DISTRIBUTION BSOP 434 Week 7 Lab Assignment; Warehousing and Distribution Activity mode aims to provide quality study notes and tutorials to the students of BSOP 434 Week 7 Lab Assignment: Warehousing and Distribution in order to ace their studies. BSOP 434 WEEK 7 LAB ASSIGNMENT To purchase this visit here: http://www.activitymode.com/product/bsop-434-week-7-lab-assignment/ Contact us at: SUPPORT@ACTIVITYMODE.COM BSOP 434 WEEK 7 LAB ASSIGNMENT: WAREHOUSING AND DISTRIBUTION BSOP 434 Week 7 Lab Assignment; Warehousing and Distribution Activity mode aims to provide quality study notes and tutorials to the students of BSOP 434 Week 7 Lab Assignment: Warehousing and Distribution in order to ace their studies. BSOP 434 WEEK 7 LAB ASSIGNMENT To purchase this visit here: http://www.activitymode.com/product/bsop-434-week-7-lab-assignment/ Contact us at: SUPPORT@ACTIVITYMODE.COM BSOP 434 WEEK 7 LAB ASSIGNMENT: WAREHOUSING AND DISTRIBUTION BSOP 434 Week 7 Lab Assignment; Warehousing and Distribution Activity mode aims to provide quality study notes and tutorials to the students of BSOP 434 Week 7 Lab Assignment: Warehousing and Distribution in order to ace their studies....

Words: 526 - Pages: 3

Premium Essay

Psych 1010 Lab Assignment 9

...Joel Palathuruthil Access id: fh8021 Section: #011 TA: Justin Aqwa Assignment 9 The Big 5 Theory of Personality is what many psychologists consider to be a test that measures the five fundamental dimensions of personality. The theory was derived in 1970 by two research teams one of Paul Costa and Robert McCrae and Warren Norman/Lewis Goldberg. Both teams took different routes to reach the same fundamental idea that most human personality traits can be boiled down to five broad dimensions of personality regardless of language or culture. The five dimensions were created by asking thousands of people many questions. Then analyzing the data with factor analysis the scientists found the five dimensions, they didn’t set out to find the dimensions but through the work of their research these dimensions were discovered. On the first trait, Openness to experience/intellect I scored on the 47th percentile and I fall a bit below the half mark on the scale. I feel I scored this percentile because I like to be in a routine and don’t really care for seeking out new experiences. I don’t entirely agree with this score because I may like routine at times but I tend to be creative and curious most of the time. Second trait, Conscientiousness I scored on the 25th percentile and I fell below the half way point of the scale. I scored this percentile because I’m not usually organized with my work or most things and it can be a mess and I have turned in work late because of that....

Words: 558 - Pages: 3

Premium Essay

Cis 417 Week 4 Assignment 2 Forensic Lab Design

...CIS 417 WEEK 4 ASSIGNMENT 2 FORENSIC LAB DESIGN To purchase this visit here: http://www.activitymode.com/product/cis-417-week-4-assignment-2-forensic-lab-design/ Contact us at: SUPPORT@ACTIVITYMODE.COM CIS 417 WEEK 4 ASSIGNMENT 2 FORENSIC LAB DESIGN Imagine the university that employs you as an information security professional has recently identified the need to design and build a digital forensic laboratory. You have been tasked with designing the lab for the organization. Write a four to five (4-5) page paper in which you: 1. Explicate the steps you would take to plan a budget for the lab, keeping...

Words: 640 - Pages: 3

Premium Essay

Bsop 330 Week 3 Lab Assignments Chapter 13 Problems 13.3, 13.5, 13.9, 13.21

...BSOP 330 Week 3 Lab Assignments Chapter 13 problems 13.3, 13.5, 13.9, 13.21 To Buy This material Click below link http://www.uoptutors.com/bsop-330-devry/bsop-330-week-3-lab-assignments-chapter-13-problems-13.3-13.5-13.9-13.21 Chapter 13 problems 13.3: The president of Hill Enterprises, Terri Hill, projects the firm’s aggregate demand requirements over the next 8 months as follows: Her operations manager is considering a new plan, which begins in January with 200 units on hand. Stockout cost of lost sales is $100 per unit. Inventory holding cost is $20 per unit per month. Ignore any idle-time costs. The plan is called plan A. Plan A: Vary the workforce level to execute a “chase” strategy by producing the quantity demanded in the prior month. The December demand and rate of production are both 1,600 units per month. The cost of hiring additional workers is $5,000 per 100 units. The cost of laying off workers is $7,500 per 100 units. Evaluate this plan. Chapter 13 problems 13.5: Hill is now considering plan C. Beginning inventory, stockout costs, and holding costs are provided in Problem 13.3: a)    Plan C: Keep a stable workforce by maintaining a constant production rate equal to the average requirements and allow varying inventory levels. b)    Plot the demand with a graph that also shows average requirements. Conduct your analysis for January through August.  ...

Words: 681 - Pages: 3

Free Essay

Cis 206 Ilab 4 Working with Directories

...I just kept the iLab assignment and book assignment side-by-side as I was reading through the instructions. The main task was multitasking several windows at the same time (i.e., iLab instructions, OS Book, Lab Mentors, Word 2010). TO Download Complete Tutorial With Screen Shots, Hit...

Words: 2827 - Pages: 12

Free Essay

Cis 175 Complete Course Cis175 Complete Course

...CIS 175 Complete Course CIS175 Complete Course Click below link for Answer http://workbank247.com/q/cis-175-complete-course-cis175-complete-course/12262 Discussions CIS 175 Week 1 Discussion "Topologies"  Please respond to the following: Per the text, network topologies are defined both physically and logically. Suppose you had to implement either a full-mesh topology or start topology network on a university campus that has ten (10) buildings. Determine the topology that would you select. Provide two (2) reasons for your choice.    Imagine that you work for a small company with one hundred (100) computers that are not on a network. Your boss comes to you for advice on whether he should implement either a peer-to-peer or client / server network. Recommend one (1) solution for your boss. Justify your recommendation with at least three (3) advantages that your choice would afford over the network that you did not choose. Click below link for Answer http://workbank247.com/q/cis-175-complete-course-cis175-complete-course/12262 CIS 175 Week 2 Discussion "Working with the OSI Model"  Please respond to the following: Industry professionals use mnemonics in order to remember the layers of the OSI model. The most popular mnemonic is "Please Do Not Throw Sausage Pizza Away," with each capital letter representing the word of the OSI, i.e., Please (Physical), Do (Data Link) and so on. Create your own unique sentence that would help you to remember the OSI model. Provide a......

Words: 6200 - Pages: 25

Free Essay

Sci 207 Week 4 and 5 Complete Work – Latest

...SCI 207 WEEK 4 AND 5 COMPLETE WORK – LATEST To purchase this, Click here http://www.activitymode.com/product/sci-207-week-4-and-5-complete-work-latest/ Contact us at: SUPPORT@ACTIVITYMODE.COM SCI 207 WEEK 4 AND 5 COMPLETE WORK - LATEST SCI-207-Week-4-DQ-1-Climate-and-Air-Pollution SCI-207 Week 4 Lab 4 Energy Sources and Alternative-Energy SCI-207-Week-4-Quiz SCI-207-Week-5-Assignment-Final-Lab-Report SCI-207-Week-5-DQ-Waste SCI-207-Week-5-Lab-5-Weather-and-Climate-Change SCI 207 Week 4 And 5 Complete Work - Latest SCI 207 Week 4 And 5 Complete Work solutions include the tutorials for week 4 and week 5 assignments. Lab, DQ, Quiz and Assignments all are answered in this package. This tutorial will help you in securing A+ grade. Please read over the Sample Final Lab Report before beginning this assignment (PDF can be found in your online course)....

Words: 806 - Pages: 4

Premium Essay

Nt2640

...NT2640 IP Networking INSTRUCTOR GUIDE Onsite Credit hours: 4.5 Contact /Instructional hours: 34 Theory, 22 Lab Prerequisite: NT1210 Introduction to Networking or equivalent Course Revision Table Change Date Updated Section Change Description Change Rationale Implementation Quarter 07/18/2011 All New Curriculum New Curriculum September 2011 02/19/2013 All Updated labs across the course to map the 2nd edition of lab manual Immediately 02/27/2013 Midterm and Final Examination Answer Keys Added examination keys Immediately 03/18/2013 Answer Keys for Midterm and Final Updated some answers to address the accuracy March 2013 04/19/2013 Assignment labels on Pages 43, 52, 61, 78, 87, 97, 106 and 132....

Words: 22068 - Pages: 89