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

Fr each of the following c assignment statementsa x a

For each of the following C assignment statements a) x = a + b*c; b) x = a/(b+c) - d*(e+f); c) x = a[i] + 1; d) a[i] = b[c[i]]; e) a[i][j] = b[i][k] + c[k][j]; f) *p++ = *q++; generate three-address code, assuming that a ...

Lab stackslab exerciseimplement the following classesclass

Lab: Stacks Lab Exercise: Implement the following classes: Class Course that includes three instance variables: private int ID; // course ID private String Name; // course name private Course next; // link next Your clas ...

Lab- forms loops and stringssubmission Lab- Forms, Loops and Strings Submission

Lab- Forms, Loops and Strings Submission Instructions How Please submit your lab report to the Lab4_Submission folder in Moodle. When Labs are due in 1 week on Feb. 13, 2014 Exercises: Goals: - Gain more hands-on with us ...

Asignmentbe sure to follow the coding standard guidelines

Assignment Be sure to follow the Coding Standard Guidelines. You must properly indent and comment your code. Indent code and insert comments to document your program. Program must be implemented and run as instructed. So ...

Assignmenta finance company provides loans for motorcycles

Assignment A finance company provides loans for motorcycles at different rates depending on how much the total loan amount is and how many payments will be made on the loan. Using the information in the table below, writ ...

Assignmentin this assignment you will implement a

Assignment In this assignment, you will implement a simplified gradebook. Your application should: Ask for a student's name. Ask for how many letter grades will be inputted. After all of the valid letter grades are enter ...

Programming oneusing jgrasp and the software development

Programming One Using jGrasp and the Software Development Kit, write a program in response to the following prompt: Write a program that prompts the user to input three numbers. This program should then output the number ...

1 show how to transform a three-address code sequence into

1. Show how to transform a three-address code sequence into one in which each defined variable gets a unique variable name. 2. Determine the types and relative addresses for the identifiers in the following sequence of d ...

Creating methodssince you have created the data objects for

Creating Methods Since you have created the data objects for Harbor View Mooring, you now need to create processes associated with each object. In order to keep with good object-oriented practices of implementation hidin ...

Business app programmingwrite the following programwrite a

Business App Programming Write the following Program: Write a Java program to the form below. The program must work with decimal numbers and each button must work correctly. The result must be done in a popup window. The ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro