Lab Session-3 CSIT221 Spring 2003 - PowerPoint PPT Presentation

About This Presentation
Title:

Lab Session-3 CSIT221 Spring 2003

Description:

... lab demo will be assigned to allow you to focus on HW#1. 2. Group Worksheet 3 Exercise. Write the specs of a class that has three private data members including an ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 4
Provided by: sunyfr
Category:
Tags: class | csit221 | lab | session | spring

less

Transcript and Presenter's Notes

Title: Lab Session-3 CSIT221 Spring 2003


1
Lab Session-3 CSIT221 Spring 2003
  • Group Worksheet 3 Exercise (Demo Required)
  • No new lab demo will be assigned to allow you to
    focus on HW1

2
Group Worksheet 3 Exercise
  • 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.

3
Test Data
  • User enters the following numbers
  • 23 34 65 77
  • Display the count of values and the error code
    character
  • User enters 102
  • Display the count of values and the error code
    character
Write a Comment
User Comments (0)
About PowerShow.com