Ask Question, Ask an Expert

+61-413 786 465

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

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As