ile Edit : | d-R四国 hat's New? 57 % TestScoreList 1 5 8 9 C 10 12 14 15 17 18 Error List View Git Project Build Debug Test Any CPU Entire Solution Error List Output Ready 66°F Sunny using System; namespace TestScoreList O references internal class TestScoreList { Program.cs X ? 2.2. O references static void Main() { 84 for (int i = 0; i < 8; i++) { } int[] nuns new int [8]; // Array to store test scores int avg; // variable to store average // variable to store sum int sun = 0; Write("Test Score List \nPlease Enter Test Score of 8 Student:-\n"); Debug } avg= sun / 8; // calculate average write("Average of Test Score of 8 Student: " + avg+ "\n"); for (int i = 0; i < 8; i++) { // display result до -= WriteLine("Student Test Score #" + (1+1) + ": 7 + nums [1] + Far From average: + (avg-nums[1])); 个 2 Code Description CS0103 The name 'Write' does not exist in the current context CS0103 The name 'Write' does not exist in the current context CS0103 The name 'Write' does not exist in the current context CS0103 The name 'WriteLine' does not exist in the current context // loop to accept test sxore Write("Enter Student Test Score a + (1+1)+": "); // display message to user nums [1] = Convert.ToInt32(Console.ReadLine()); // accept number convert it to integer and store it into array sun += nums[1]; // calculate sun of all numbers Analyze Tools Extensions Start D M TestScoreList.TestScoreList 4 Errors A 0 Warnings 00 Messages °r Build+ IntelliSense # 3 * $ 4 101 5 fs % 5 Window < 6 Help 6 M Project TestScoreList TestScoreList TestScoreList TestScoreList 88 Search (Ctrl+Q) 蝦习习习。 hp 7 Main() * File Program.cs Program.cs Program.cs Program.cs + 8 fg 144 9 P TestScoreList Ln: 37 f10 Search Error List Ch: 1. SPC Line Suppression State Active Active 24 Active 14 18 27 Active ▷11 0 fil Add

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

C# Question 2. I get these 4 errors and don't know how to fix or get rid of them. I've tried everything. Help would be appreciated!

This image showcases a snapshot of a Visual Studio environment where a C# program is being developed. Below is a transcription and description of the content visible in the image:

### Code Transcription

```csharp
using System;

namespace TestScoreList
{
    internal class TestScoreList
    {
        static void Main()
        {
            int[] nums = new int[8]; // Array to store test scores
            int avg; // Variable to store average
            int sum = 0; // Variable to store sum

            Write("Score List \\nPlease enter Test Score of 8 Student:\\n");

            // Input each score in list
            for (int i = 0; i < 8; i++)
            {
                Write("Enter Student Test Score " + (i + 1) + ": ");  // Display message to user
                nums[i] = Convert.ToInt32(Console.ReadLine()); // Accept number convert it to integer and store it into array
                sum = sum + nums[i]; // Calculate sum of all numbers
            }

            avg = sum / 8; // Calculate average

            for (int i = 0; i < 8; i++)
            {
                WriteLine("Student Test Score " + (i + 1) + " : " + nums[i]);

                if (nums[i] < avg)
                {
                    WriteLine(" : " + "Far From Average " + (avg - nums[i]));
                }
            }
        }
    }
}
```

### Error List
The screenshot displays an error list with 4 errors:
- `CS0103: The name 'Write' does not exist in the current context` (Lines 14 and 18)
- `CS0103: The name 'WriteLine' does not exist in the current context` (Line 27)

### Explanation
The errors occur because the methods `Write` and `WriteLine` are used instead of `Console.Write` and `Console.WriteLine`. These methods are part of the `System` namespace's `Console` class, so they need to be called with the `Console` prefix unless additional using directives are specified.

### Graphs or Diagrams
There are no graphs or diagrams in the image. The focus is on a C# coding project within the Visual Studio IDE.

### Additional Context
The code attempts to store and analyze test scores for 8 students. The program calculates and
Transcribed Image Text:This image showcases a snapshot of a Visual Studio environment where a C# program is being developed. Below is a transcription and description of the content visible in the image: ### Code Transcription ```csharp using System; namespace TestScoreList { internal class TestScoreList { static void Main() { int[] nums = new int[8]; // Array to store test scores int avg; // Variable to store average int sum = 0; // Variable to store sum Write("Score List \\nPlease enter Test Score of 8 Student:\\n"); // Input each score in list for (int i = 0; i < 8; i++) { Write("Enter Student Test Score " + (i + 1) + ": "); // Display message to user nums[i] = Convert.ToInt32(Console.ReadLine()); // Accept number convert it to integer and store it into array sum = sum + nums[i]; // Calculate sum of all numbers } avg = sum / 8; // Calculate average for (int i = 0; i < 8; i++) { WriteLine("Student Test Score " + (i + 1) + " : " + nums[i]); if (nums[i] < avg) { WriteLine(" : " + "Far From Average " + (avg - nums[i])); } } } } } ``` ### Error List The screenshot displays an error list with 4 errors: - `CS0103: The name 'Write' does not exist in the current context` (Lines 14 and 18) - `CS0103: The name 'WriteLine' does not exist in the current context` (Line 27) ### Explanation The errors occur because the methods `Write` and `WriteLine` are used instead of `Console.Write` and `Console.WriteLine`. These methods are part of the `System` namespace's `Console` class, so they need to be called with the `Console` prefix unless additional using directives are specified. ### Graphs or Diagrams There are no graphs or diagrams in the image. The focus is on a C# coding project within the Visual Studio IDE. ### Additional Context The code attempts to store and analyze test scores for 8 students. The program calculates and
**Chapter 6: Using Arrays**

1. **TestScoreList Program**
   - Develop a program named `TestScoreList` that takes eight integer values representing student test scores. The program should display each score alongside a message indicating its deviation from the average score.

2. **TemperaturesComparison Program**
   - Create a program named `TemperaturesComparison` that accepts daily Fahrenheit temperatures, ranging from -30 to 130. If a temperature is out of this range, prompt the user to reenter it.
   - If a temperature is lower than the previous one, display the message "Getting warmer."
   - If every temperature is lower than the last, in ascending or descending order, display "Getting cooler."
   - If temperatures are not in order, display "It's a mixed bag."
   - Finally, show the temperatures in the entered sequence and calculate their average.

3. **CheckZips Program**
   - Write a program named `CheckZips` for a package delivery service. This program contains an array with the zip codes of delivery areas.
   - Prompt the user to enter a zip code and display a message if the zip code is within the delivery area.

4. **DeliveryCharges Program**
   - Develop a program called `DeliveryCharges` for managing package delivery charges using an array of 10 zip codes, as used in `CheckZips`.
   - Create a parallel array with delivery charges for each zip code.
   - Prompt the user to enter a zip code, then display the delivery charge for that zip code or indicate non-delivery if applicable.
Transcribed Image Text:**Chapter 6: Using Arrays** 1. **TestScoreList Program** - Develop a program named `TestScoreList` that takes eight integer values representing student test scores. The program should display each score alongside a message indicating its deviation from the average score. 2. **TemperaturesComparison Program** - Create a program named `TemperaturesComparison` that accepts daily Fahrenheit temperatures, ranging from -30 to 130. If a temperature is out of this range, prompt the user to reenter it. - If a temperature is lower than the previous one, display the message "Getting warmer." - If every temperature is lower than the last, in ascending or descending order, display "Getting cooler." - If temperatures are not in order, display "It's a mixed bag." - Finally, show the temperatures in the entered sequence and calculate their average. 3. **CheckZips Program** - Write a program named `CheckZips` for a package delivery service. This program contains an array with the zip codes of delivery areas. - Prompt the user to enter a zip code and display a message if the zip code is within the delivery area. 4. **DeliveryCharges Program** - Develop a program called `DeliveryCharges` for managing package delivery charges using an array of 10 zip codes, as used in `CheckZips`. - Create a parallel array with delivery charges for each zip code. - Prompt the user to enter a zip code, then display the delivery charge for that zip code or indicate non-delivery if applicable.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY