'F' → Fullscreen
Create a new C# program named 1-4-announcement. Start it empty — delete anything the template gives you.
You are writing an announcement for an event: a game, a meet, a concert, a club night, a tournament. Pick your own. Every line of it is text you type.
Console.WriteLine("FRIDAY NIGHT - HOME GAME");FRIDAY NIGHT - HOME GAMEThat is a complete program. One statement, no framework, and nothing on the screen you did not put there.
Count, do not guess, when you center the title. Both borders below are 40 characters and the title is 24, which leaves 16 to split — so 8 spaces go in front of it. Your numbers will be different, and the checkpoint asks how you worked yours out.
Console.WriteLine("========================================");Console.WriteLine(" FRIDAY NIGHT - HOME GAME");Console.WriteLine("========================================");Console.WriteLine();Console.WriteLine("Doors open at 6:00.");Console.WriteLine("Tip-off at 7:00.");Console.WriteLine("Student section: bring your ID.");Console.WriteLine();Console.WriteLine("Wear gold.");======================================== FRIDAY NIGHT - HOME GAME========================================
Doors open at 6:00.Tip-off at 7:00.Student section: bring your ID.
Wear gold.Console.Write for every piece except the last one.Console.WriteLine, and work out why it has to be.Try it with all four as WriteLine first. Look at what you get, then change them. Being shown the difference is worth less than seeing it once.
Console.WriteLine("========================================");Console.WriteLine(" FRIDAY NIGHT - HOME GAME");Console.WriteLine("========================================");Console.WriteLine();Console.WriteLine("Doors open at 6:00.");Console.WriteLine("Tip-off at 7:00.");Console.WriteLine("Student section: bring your ID.");Console.WriteLine();Console.Write("Countdown: ");Console.Write("3... ");Console.Write("2... ");Console.WriteLine("1... GO");Console.WriteLine();Console.WriteLine("Wear gold.");======================================== FRIDAY NIGHT - HOME GAME========================================
Doors open at 6:00.Tip-off at 7:00.Student section: bring your ID.
Countdown: 3... 2... 1... GO
Wear gold.WriteLine on one statement. Run it.One of these two mistakes stopped the program. The other one did not. The difference is the most useful thing in this session, and the reflection asks you to explain it.
/* */ note at the very top of the file with the name of your event and the sections in the order they print. Use more than one line — that is what the form is for.//. Run it, and confirm that line of output is gone and there is no error. Then put it back./* Friday night announcement Banner, details, countdown, sign-off*/
// BannerConsole.WriteLine("========================================");Console.WriteLine(" FRIDAY NIGHT - HOME GAME");Console.WriteLine("========================================");Console.WriteLine();
// Times and rulesConsole.WriteLine("Doors open at 6:00.");Console.WriteLine("Tip-off at 7:00.");Console.WriteLine("Student section: bring your ID.");Console.WriteLine();
// The countdown shares one lineConsole.Write("Countdown: ");Console.Write("3... ");Console.Write("2... ");Console.WriteLine("1... GO");Console.WriteLine();
// Sign-offConsole.WriteLine("Wear gold.");A commented-out statement and a deleted statement behave identically. The difference is that you can get one of them back.
Before you submit, check all six:
/* */ note.The last one is the one that cannot be reconstructed afterward. Both of those come from running the program, and neither can be worked out by reading it.
Answer the following questions before submitting your work.
WriteLine and the compiler stopped you. You misspelled a word inside quotation marks and it did not. Why can the compiler catch one and not the other?Console.WriteLine(); both look like they do nothing. Which one actually changes your output, and how can you tell?Submit four things to the dropbox: