Step-by-step solution file
programming 1.0 Overview The Book Worm, a privately owned
|The Book Worm, a privately owned business dealing in a variety of books and periodicals is in need of a program that will store inventory records on books and periodicals and provide ready access to the information. This statement of work addresses the first phase of this project. That is to develop and test an appropriate record data structure. |
|The student shall define, develop, document, prototype, test, and modify as required the software system. |
|2.1 This software system shall consist of one source file (.cpp) and one header file (.h) defining a C++ class which can be used to store information on books and/or periodicals. |
|2.2 The header file, which shall be named BookRecord.h, shall define a C++ class. The source file, which shall be named BookRecord.cpp, shall implement all functions of the class. |
|2.2.1 The class shall contain the following private variables: (1) a character array called m_sName, (2) a long called m_lStockNum, (3) an integer called m_iClassification, (4) a double called m_dCost, and (5) an integer called m_iCount. Details of these variables are defined below. |
|22.214.171.124 m_sName--This character array shall be 128 bytes in length and will be used to store the name of a book or periodical. |
|126.96.36.199 m_lStockNum--This long shall be used to store a unique stock number for the book or periodical. This will be used as the key in any store, search, or retrieval operations. |
|188.8.131.52 m_iClassification--This integer will be used to code specific information about the book or periodical. |
|184.108.40.206 m_dCost--This double will be used to store the cost of this book or periodical. |
|220.127.116.11 m_iCount--This integer will be used to store the number of copies of this item currently in the inventory. |
|2.2.2 The class shall contain the following public functions: a constructor and destructor and get and set functions for each of the variables. These functions shall work as described in the following paragraphs. |
|18.104.22.168 BookRecord()--The default constructor shall set the member variables to the following initial values: m_sName = "", m_lStockNum = 0, m_iClassification = 0, m_dCost = 0.0, and m_iCount = 0. |
|22.214.171.124 BookRecord(char *name, long sn, int cl, double cost)--This constructor shall set the member variables to the values passed into the function and initialize the m_iCount variable to one (1). |
|126.96.36.199 ~BookRecord()--The destructor shall be an empty, place-holder function. |
|188.8.131.52 void getName(char *name), void setName(char *name)--The getName() function shall be defined as a pointer function. A call to this function will copy the member variable m_sName into the character array pointed to by the function argument. The setName() function will copy the function argument into the member variable m_sName. |
|184.108.40.206 long getStockNum(), void setStockNum(long sn)--The getStockNum() function shall return the value stored in the member variablem_lStockNum. The setStockNum() function will copy the function argument into the member variable m_lStockNum. |
|220.127.116.11 void getClassification(int& cl), void setClassification(int cl)--The getClassification() function shall be defined as a reference function. A call to this function will copy the member variable m_iClassification into the interger variable referenced by the function argument. This is not the way a get function normally works, but we are using a reference argument to practice using references in functions. The setClassification() function will copy the function argument into the member variable m_iClassification. |
|18.104.22.168 void getCost(double *c), void setCost(double c)--The getCost() function shall be defined as a pointer function. A call to this function will copy the member variable m_dCost into the double variable pointed to by the function argument. This is not the way a get function normally works, but we are using a pointer argument to practice using pointers in functions. The setCost() function will copy the function argument into the member variable m_dCost. |
|22.214.171.124 int getNumberInStock(), void setNumberInStock(int count)--The getNumberInStock() function shall return the value stored in the member variable m_iCount. The setNumberInStock() function will copy the function argument into the member variable m_iCount. |
|126.96.36.199 void printRecord()--This function shall print to the screen all data found in the record. Data should all be printed on a single line. |
|These products shall be delivered to the instructor electronically via e-mail as specified below. |
3.1 Sprint Report -- The student shall provide a filled out Sprint Report form for instructor approval NLT (Not Later Than) Monday, September 19.
3.2 Program source files -- The student shall provide fully tested electronic copies of the .cpp and .h files. These files must be submitted to the instructor via e-mail. The files shall be delivered NLT Monday, September 19.
|4.0 Period of Performance|
The period of performance of this assignment is 21 days from the date of assignment. Only under special circumstances will any deliverables be accepted after 30 days from the date of assignment.
This question was answered on: Feb 21, 2020
This attachment is locked
We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)
Need a similar solution fast, written anew from scratch? Place your own custom order
We have top-notch tutors who can help you with your essay at a reasonable cost and then you can simply use that essay as a template to build your own arguments. This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student. New solution orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.