lab2 - 15-121 FALL 2009 [CORTINA/REID-MILLER]LAB 2In this...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121 FALL 2009 [CORTINA/REID-MILLER]LAB 2In this recitation, you will create a class to represent a set of television channels for a cable TV system. You will read the television channel data from a text file. Each television channel in the file consists of a number followed by a name on the same line. For example: 101 National Geographic ChannelThe first line in the file contains the number of channels stored in the file. Click HEREfor a copy of the data file to view. NOTE: The channels in the file are already in alphabetical order based on channel name. EXERCISESDownload the CableTV.zipproject folder. Inside there is a class named Channelwhich represents a single TV channel with two fields, a number and a name, along with the usual accessors and mutators. 1.In the class named CableSystem, the constructor has one parameter specifying the name of the data file that contains the television channel data. The constructor opens the file and loads the data into an array leaving no empty cells. If the file is not there, it reports an error and exits the program. Read through the constructor and explain to your partner how it...
View Full Document

Page1 / 6

lab2 - 15-121 FALL 2009 [CORTINA/REID-MILLER]LAB 2In this...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online