Download presentation
Presentation is loading. Please wait.
2
1 Lab Session-3 CSIT221 Spring 2003 b Group Worksheet 3 Exercise (Demo Required) b No new lab demo will be assigned to allow you to focus on HW#1
3
2 Group Worksheet 3 Exercise b Write the specs of a class that has three private data members including an integer array of 20 numbers, an integer counting the number of elements entered into the array and a character indicating error code. The class should also include a constructor that sets the error code to ‘X’ and a member function that accepts user input passed to it from the client code and places it into the array incrementing the count. This function sets the error code to ‘Z’ if the number entered is greater than 100. Write all the member functions mentioned and then test your program with client code using the test data provided on the next slide. You may have to add some new member function(s) to allow the display of private data.
4
3 Test Data b User enters the following numbers: b 23 34 65 77 b Display the count of values and the error code character b User enters 102 b Display the count of values and the error code character
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.