Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

Introduction

This assignment follows the application to examine the problem of managing the accounts and inventory for a bookstore. In this assignment, we focus on different types of inventory and you are required to develop a solution using the C++ language that has the following features:

• Handles different types of inventory;

• Record the Purchases and Sales based on the type of item and an assigned mark-up; and

• Uses a pointer array of inventory to store the different items in.

Requirements

This assignment requires you to prepare C++ code to implement four classes Note that while some of these classes are related to those developed in the second assignments, the functionality of those assignments has been significantly reduced to focus on polymorphism and templates, e.g., both SalesRegister and Publisher classes are removed. The classes you must develop are:

A Template SimpleList class:

•    The SimpleList class must have the following features:

•    Attribute/s to store the constant array pointer list of the Inventory

•    objects and the count to keep track current element.

•    Accessor and/or manipulator methods where appropriate

•    AddElement function will check to make sure the current item is not reached the size before adding the parameter object on to the array list

•    A constructor to initialise the Simple Item array list object

•    A Print() has an output operator to format appropriately the data stored on the simple lis (sensible field widths should be used).

•    A GetCount() return the current number of item on the array

•    A GetItem(int position) return the item element on the array list at the parameter position.

An Inventory class:

This is an abstract class which has 4 pure virtual functions:

•    A GetItemData() function allows to prompt user for the item details ;

•    A RecordSales() function will update the sold quantity for the inventory if the stock is higher or equal to the sold quantity parameter;

•    A RecordPurchase() function will update the purchase quantity for the inventory by the sold quantity parameter;

•    A Print() function display the inventory item details and purchased and sold information

A StockItem class is inherited from the Inventory class:

• Has cost price, mark-up, sold quantity and purchase quantity attributes;

• Has a custom constructor, accessor and mutator functions for the above description attributes; and

• And four other virtual functions to implement the RecordSales() and throw exception if there is not enough stock for the transaction record, GetData(), RecordPurchase() and Print() which described in the Inventory class.

A GeneralItem class is inherited from the StockItem class :

• Has the item description attribute;

• The GetData() function will prompt the user to input the item description attribute and the markup attribute from the StockItem;

• Has a custom constructor, accessor and mutator functions for the above description attributes; and

• And the Print() display description attributes and all StockItem details.

A BookItem class is inherited from the GeneralItem class :

• Has the extra Book Author, Publisher and Year attributes;

• The GetData() function will prompt the user to input the author, publisher, year details and the markup attribute from the StockItem;

• Has a custom constructor, accessor and mutator functions for the above description attributes; and

• And the Print() display described attributes and all StockItem details.

Your assignment must also satisfy the following requirements:

• You must use polymorphism in your solution to record the sales, purchases, get data and print functions;

• You do not need to consider exceptions for this assignment (they will return in the final assignment);

• Tabs (\t) can be used for formatting purposes;

• You must use the main() function, above. Note that not all functions required above may be invoked by the provided main(); and

• All floating point data should be displayed to two decimal places. For information on how to set the number of decimal places, see the Manipulators
You do not need to restore the number of decimal places

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91533

Have any Question? 


Related Questions in Programming Language

Programming lab assignment set awhat to submitcomplete

Programming Lab Assignment (Set A) What to Submit Complete Problem Solving Steps 1 - 3 (check plan, data analysis, initial algorithm, and refinement algorithm) for the following programs. 1. (Name: lab1a-1.cpp) Write a p ...

Questioncomplete tutorial 10 case problem 2 - ridgewood

Question: Complete Tutorial 10 Case Problem 2 - Ridgewood Herald Tribune found on pages 734-736 of your textbook. Complete the entire website assignment and upload your files to your 000WebHost account. After uploading t ...

Assignmentcase problem1 - online trivia found on pages

Assignment: Case Problem1 - Online Trivia found on pages 794-795 of your textbook. Complete the web pages and upload them to your 000WebHost account. After uploading the files make sure to update your index.html page to ...

Cp1404cp5632 2016 sp22252 assignment 1 - shopping list

CP1404/CP5632 2016 SP2/22/52 Assignment 1 - Shopping List 1.0 Task: You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will hel ...

Pair programming phase 1talent agency user stories1 user

Pair Programming Phase 1 Talent Agency User Stories 1. User Story 1 As a head office administrator I want to be able to produce formatted output of all the information about our talent agencies so that I can easily incor ...

Consider the following three programswhere i k l are low

Consider the following three programs: where i, k, l are low variables and a, b, c, d, h, n are high variables. Assume db is a database with two columns (shown as array, where the index represents the row), lookup and is ...

Purposethe purpose of this assignment is to practice using

Purpose: The purpose of this assignment is to practice using loops, selections, and other basic features of Java in order to solve a real-world problem. Program Description: The Jeddah Broker Company is one of the compan ...

Complete the attached code and do junit testing can you

Complete the attached code and do junit testing. Can you help with this? Testing class tests Check Date methods serves as a "test plan" for developer's testing. Complete/correct and test/demonstrate using Junit with test ...

Your problem is as followswrite a program that will ask the

Your problem is as follows: Write a program that will ask the user to enter 4 quiz scores for 3 students.  You will need to fine the lowest quiz grade and drop it out when you calculate the average. You will need to disp ...

Operating systems assignment-1 binary record sorting in

Operating Systems Assignment- 1. Binary Record Sorting in Ascending Order| You will write a simple sorting program. This program should be invoked as follows: shell% ./fastsort -i inputfile -o outputfile The above line m ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate