[Solved] CS_1C Homework 7-Pointers & Dynamic Arrays

$25

File Name: CS_1C_Homework_7-Pointers_&_Dynamic_Arrays.zip
File Size: 395.64 KB

SKU: [Solved] CS_1C Homework 7-Pointers & Dynamic Arrays Category: Tag:
5/5 - (1 vote)

Develop software using dynamic arrays (using the new and delete operators) that allows a user to enter the names of the athletic equipment below.

  1. If Mark purchases two pairs of Nike basketball shoes, three Under Armour T-shirts, four Nike shorts, and one pair of Brooks running shoes; print a receipt for the purchase including the total cost before and after tax. Assume the tax rate is 8.25%
  2. Print an inventory list before and after Marks purchase.
  3. Add a copy constructor to your inventory management class. Test the copy constructor by instantiating a new inventory management object which is a copy of the original. Print an inventory list for the new object. This should match the original inventory.
  4. Your program must use pointer variables for all variables.
  5. Use at least one user defined namespace.
Name of equipment Cost Quantity
Nike basketball shoes $145.99 22
Under Armour T-shirt $29.99 33
Brooks running shoes $111.44 11
Asics running shoes $165.88 20
Nike shorts $45.77 77

Extra Credit [+10 pts]: Maintain a transaction history of all items purchased. Print an audit log of all transactions including cost & quantity for items. Ensure the copy constructor from step 3 also makes a copy of the transaction history.

HW07 Pointers & Dynamic Arrays [100 pts]

Use the command script to capture your interaction compiling and running the program, including all operations, as shown below:

CS1C Fall 2018 TTH HW07 100pts Due: Tu 9/25/2018

[email protected] ~/cs1c/hw/07 $ script hw07.scr Script started, file is hw07.scr [email protected] ~/cs1c/hw/07 $ date

..

[email protected] ~/cs1c/hw/07 $ ls -l

[email protected] ~/cs1c/hw/07 $ make all

[email protected] ~/cs1c/hw/07 $ ls -l

[email protected] ~/cs1c/hw/07 $ ./hw07

// print out output from step 2 and 3

[email protected] ~/cs1c/hw/07 $ exit Script done, file is hw07.scr

[email protected] ~/cs1c/hw/07 $ make tar

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS_1C Homework 7-Pointers & Dynamic Arrays
$25