[Solved] CS_1C Homework 13-Exceptions

$25

File Name: CS_1C_Homework_13-Exceptions.zip
File Size: 263.76 KB

SKU: [Solved] CS_1C Homework 13-Exceptions Category: Tag:
5/5 - (1 vote)

using HW12

  1. Test the assert macro (both pass and fail); print a corresponding output statement.
  2. Add exceptions to the queue template.
    1. Throw an exception if the capacity is exceeded. Print an appropriate error message in the associated exception handler.
    2. Throw an exception if your program tries to remove from an empty queue. Print an appropriate error message in the associated exception handler.
    3. Test both exceptions

Following an exception, the program should allow one to recover from a mistake without corrupting the contents of the queue.

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

CS1C Fall 2018 TTH HW13 50pts Due: Fri 11/16/2018

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

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

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

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

[email protected] ~/cs1c/hw/13 $ ./hw13

HW13 Exceptions [50 pts]

// print output from steps 1 and 2 above

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

[email protected] ~/cs1c/hw/13 $ 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 13-Exceptions
$25