Download presentation
Published byBarbra Lauren Cook Modified over 9 years ago
1
Visual C++ Programming: Concepts and Projects
Chapter 7B Arrays (Tutorial)
2
Tutorial: Classroom Seating
Problem Analysis Create a classroom seating chart Color code the seats to match student performance levels Red = below the mean Yellow = mean up to 90% Green = 90% or better Visual C++ Programming
3
Design Interface sketch Variables and constants Control Table
NUMROWS, NUMCOLS Data Table Drawing objects Visual C++ Programming
4
Visual C++ Programming
5
Visual C++ Programming
6
Visual C++ Programming
7
Visual C++ Programming
8
Visual C++ Programming
9
Visual C++ Programming
10
Design (continued) Algorithm for seating chart
Draw a rectangle in every column in each row Algorithm for coloring seats For each seat Determine the student score Determine color of the seat based on score Color the seat rectangle Trace sample data to test the algorithms Visual C++ Programming
11
Visual C++ Programming
12
Visual C++ Programming
13
Visual C++ Programming
14
Visual C++ Programming
15
Visual C++ Programming
16
Visual C++ Programming
17
Visual C++ Programming
18
Visual C++ Programming
19
Development Create the interface
Code the constants and instance variables Code Form1_Load() Code btnShow_Click() Code btnGroups_Click() Visual C++ Programming
20
Visual C++ Programming
21
Visual C++ Programming
22
Visual C++ Programming
23
Visual C++ Programming
24
Visual C++ Programming
25
Visual C++ Programming
26
Visual C++ Programming
27
Visual C++ Programming
28
Visual C++ Programming
29
Testing Verify that interface matches Figure 7-17
Verify that the mean is correct Make sure that the seats are colored correctly to match the three levels of student performance Visual C++ Programming
30
On Your Own Display the highest score
Display a count of scores above the mean Visual C++ Programming
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.