CIS170B Week 2 iLab Part B help.

CIS170B Week 2 iLab Part B help.

 

Your mission: Write a program that translates a TV channel (1 through 10) in your area to its respective call sign. For example, in the New York metropolitan area, channel 2 translates to WCBS. If a channel is unused in your area, tell the user that this is the case.

Sample output from program:

Translate TV Channel Number to Call Sign

Enter channel number:  1
Channel 1 is undesignated in your area

Enter channel number:  2
Call sign for channel 2 is WCBS

Enter channel number:  6
Call sign for channel 6 is WRNNDT

 

Tips

 

Best practice: Put yourself in the place of the program. What steps would you personally need to perform in order to process a channel translation yourself? Write out those steps on paper as pseudocode and/or in Visual Studio as C# comments, and then implement them one by one, testing as you go. Remember to not write too much at one time. Always add and test functionality incrementally!

Pseudocode: Although there are several valid ways to write the program, the following is an outline of one way to design the overall logic.

  • Declare variables for channel and call sign

  • Get channel number from user

  • Use appropriate decision structure to translate number to call sign

  • If number is valid in area
    • Print out translation

  • If not
    • Tell user this is the case

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"FIRST15"

Order Now