当前位置:天才代写 > Assembly代写 > Milestone代写 CustomerOrder代写 assembly line代写 Tester Module代写

Milestone代写 CustomerOrder代写 assembly line代写 Tester Module代写

2020-12-02 17:33 星期三 所属: Assembly代写 浏览:212

Milestone代写

Milestone Overview

Milestone代写 This milestone will implement and test the CustomerOrder class.The CustomerOrder class is used to encapsulate and manage

This milestone will implement and test the CustomerOrder class.

The CustomerOrder class is used to encapsulate and manage all the details related to a customer order on the assembly line.

CustomerOrder class Milestone代写

A CustomerOrder object manages a single order on the assembly line and contains the following information:

  • std::string m_name the name of the customer (e.g., John, Sara, etc)
  • std::string m_product the name of the product being assembled (e.g., Desktop, Laptop, etc)Milestone代写
  • unsigned int m_cntItem– a count of the number of items for the customer’s order
  • ItemInfo** m_lstItem– a dynamically allocated array of pointers. Each element of the array is a dynamically allocated object of type ItemInfo (see below). This is the resource that your class must
  • static size_t m_widthField– the maximum width of a field, used for display purposes
Milestone代写
Milestone代写

The member functions of the CustomerOrder class include:Milestone代写

  • default constructor
  • a custom constructor that takes as a parameter a reference to a string containing a single record from the input file. This constructor uses an Utilitiesobject to extract the tokens and populate the current instance. After the extraction is finished, will update CustomerOrder::m_widthField if the value stored there is smaller than the value stored in Utilities::m_widthField.Milestone代写
    • fields in the record are (separated by adelimiter):
      • CustomerName
      • OrderName
      • the list of items making up the order (at least oneitem)
    • a CustomerOrderobject should not allow copy operations. The copy constructor should throw an exception if called and the copy operator= should be deleted.
    • moveconstructor
    • move assignmentoperator
  • adestructor Milestone代写
  • boolgetItemFillState(std::string) const – returns the ItemInfo::m_fillState of the item specified as a parameter. If the item doesn’t exist in the order, return true.
  • boolgetOrderFillState() const – returns true if all the items in the order have been filled; false otherwise
  • void fillItem(Item& item, std::ostream&) – fills the item in the current order thatcorrespondsto the item passed into the function (the parameter item represents what is available in the inventory).Milestone代写
  • if item cannot be found in the current order, this function does nothing
  • if itemis found, and the inventory contains at least one element, then this function substracts 1 from the inventory and updates ItemInfo::m_serialNumber and ItemInfo::m_fillState. Also it prints the message Filled NAME, PRODUCT[ITEM_NAME].
  • if item is found, and the inventory is empty, then this function prints the message
Unable to fill NAME, PRODUCT[ITEM_NAME].
  •  all messages printed should be terminated by an endline Milestone代写
  • void display(std::ostream&) const– displays the state of the current object in the format (see the sample output for details)

CUSTOMER_NAME – PRODUCT

[SERIAL] ITEM_NAME – STATUS

[SERIAL] ITEM_NAME – STATUS

 

  • SERIAL– a field of width 6
  • ITEM_NAME– a field of size m_widthField
  • STATUSis either FILLED or MISSING
  • you will have to use IO manipulators for the output.Milestone代写

Also, add to the header CustomerOrder.h, the following structure:

struct ItemInfo

{

std::string m_itemName;

unsigned int m_serialNumber = 0;Milestone代写

 bool m_fillState = false;

ItemInfo(std::string src) : m_itemName(src) {};

};

Tester Module

The tester module and input files have been attached to this post. Do not modify any of them. See in the sample output below the expected command line.Milestone代写

Sample Output

Milestone代写
Milestone代写

The output for this milestone should look as follows: 

[000000] GPU  MISSING

[000000] GPU  MISSING

[000000] SSD  MISSING

[000000] Power Supply – MISSING Chris S. – Laptop

[000000] CPU  MISSING

[000000] Memory  MISSINGMilestone代写

[000000] SSD  MISSING

[000000] Power Supply – MISSING Mary-Lynn M. – Desktop PC

[000000] CPU  MISSING

[000000] Memory  MISSING

[000000] Power Supply – MISSING Chris T. – Micro Controller [000000] GPU  MISSING

[000000] GPU  MISSING

[000000] Power Supply – MISSING [000000] SSD  MISSING

=======================

= Manual Validation =

=======================

CustomerOrders::display(): Chris T. – Micro Controller

[000000] GPU – MISSING

[000000] GPU – MISSING

[000000] Power Supply – MISSING

[000000] SSD – MISSING

CustomerOrders::CustomerOrders(string): Chloe – Flight PC

[000000] CPU – MISSING Milestone代写

[000000] GPU – MISSING

[000000] Power Supply – MISSING

CustomerOrders::operator=(&&): Mary-Lynn M. – Desktop PC

[000000] CPU – MISSING

[000000] Memory – MISSING

[000000] Power Supply – MISSING

CustomerOrders::fillItem()

getOrderFillState(): MISSING

Filled Mary-Lynn M., Desktop PC[CPU]

getItemFillState(“CPU”): FILLED

getOrderFillState(): MISSING

Filled Mary-Lynn M., Desktop PC[CPU]

Filled Mary-Lynn M., Desktop PC[Memory]

Filled Mary-Lynn M., Desktop PC[Power Supply]

getOrderFillState(): FILLED

Submission Milestone代写

Before the due date, upload to your matrix account the following files:

  • Utilities.h
  • Utilities.cpp
  • Item.h
  • Item.cpp
  • CustomerOrder.h
  • CustomerOrder.cpp 

From a command prompt, execute the following command:

~mahboob.ali/submit 345_ms2

and follow the instructions.Milestone代写

A successful submission does not guarantee full credit!

Due Date

· Sunday, Nov 25, 2018 @ 23:59:59 Mahboob Ali

Milestone代写
Milestone代写

更多其他:C++代写 考试助攻 计算机代写 report代写 project代写 数学代写 java代写 程序代写 algorithm代写  r代写 北美代写 代写CS 代码代写 function代写 作业代写 物理代写 数学代写

合作平台:天才代写 幽灵代写 写手招聘 Essay代写

 

天才代写-代写联系方式