Show Bid Request
template classe
Bid Request Id: 30393
|
|
|
Posted by: |
amerelkhatib (4 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Oct 9, 2002 2:25:28 AM EDT
|
Bidding Closes: |
Oct 10, 2002 6:00:00 AM EDT
|
Viewed (by coders): |
76 times
|
Deadline: |
10/10/2002 10:00:00 AM
TIME EXPIRED
|
|
|
|
Description:
we examine the use of template classes and exception handling. The starter program exercises a template class called bc_array which throws several exceptions. The code prompts the user for a size of a dynamic array and then asks for elements to be entered. The array size must be larger than 0, but since it is stored in an integer any number, including 0 or negative values, could be entered. We have used various techniques to deal with invalid values passed into constructors, such as using the assert statement to terminate the program when illegal input occurs, or prompting the user repeatedly until a valid input value is received. Neither of these approaches are satisfactory, because they force the programmer using the class to adopt a specific approach to dealing with the error.
If you compare the execution of a program with the operation of a business, you will notice that both consist of a hierarchy of classes and functions. In a business, we expect the upper layers of the company (managers) to set policy and the people in lower positions (workers) to implement the policy. We want the same type of behavior in our programs, but our usual approach to handling errors leads to an inversion of authority -- the bottom layer (implemention of the class) is making decisions for the top-layer (user&'s application program). A better approach to managing this problem is to use an exception handler that passes control back to a top-level function when an error occurs so the user can make the decision to terminate the program or run code to handle or correct the problem.
Your task is to make a project and build a program using the three files of the starter code, then exercise it with different inputs and trace it (using the debugger) to get an understanding of how the flow-of-control changes when exception handling is used, particularly the try and catch blocks, and see what changes occur when the code is modified. Record the results of each exercise on the attached sheet and turn it in to the Teaching Assistant.
Exercise 1. Start the debugger and set a breakpoint on the first line of the bc_array constructor. Press F5 and when prompted, input a size of 15. When the breakpoint stops execution, use F10 to step through the constructor code line-by-line. After the constructor finishes, press F5. Enter short strings to store in the object. Write down the output.
Exercise 2. Restart the debugger and run the program as before.
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
windows, internet explorer
Must be 100% finished and received by buyer on:
Oct 10, 2002 10:00:00 AM EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
$13 (USD)
|
Oct 9, 2002 3:52:29 AM EDT
|
9.83
(Excellent)
|
|
|
It's Alex. We've already discussed it. |
|
|
|
This bid was accepted by the buyer!
|
$13 (USD)
|
Oct 9, 2002 3:52:30 AM EDT
|
9.83
(Excellent)
|
|
|
It's Alex. We've already discussed it. |
|
|
|
|
|