Lightening Lanes Case Study Problem Statements On Tuesday afternoons, Lightening Lanes Bowling Alley runs a special class to teach children to bowl. Each lane has an instructor who works with a team of four student bowlers and instructs them as they bowl three lines (games). The management of Lightening Lanes has asked you to develop a program that will report each student’s 3-game average score and compare it to the average score they bowled the previous week. In this way, the students can see how much they are improving. The program will utilize looping structures and data validation techniques learned in class. Input: Input should come from the keyboard, using suitable prompts. First the team names hould be entered. Then, for each of the four students on the team, the program should input their name, their previous week’s average score, and their score from each of today’s games. The score for each game must be between 0 and 300.Output: Output should be written to a file. It should be in the form of a report that lists the team name, each student’s name, their 3-game average from last week, and their 3-game average from today. Program Design General Pseudocode: The following general pseudocode lists the steps the program must carry out.Open the output file Input the team name Print report heading which includes team name For each of the 4 students Input the student’s name Input and validate their last week’s bowling average Input, validate, and add up each of their game scores from to day Print student name, last week’s average and today’s calculated average End for Close the file Variables Whose Values Will be Input : string teamName // the team name name // a student’s name double oldAvg // a student’s previous week’s averages score // a student’s score for 1 game Variable Whose Value Will be Accumulated int total // a student’s total 3-game score
Your code goes here:
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace gamescoreAveragetoFileconsole
{
class Program
{
//Declaring the required class variables
string teamName;
string studentName;
double oldAverage;
double newAverage;
double totalScore;
static void Main(string[] args)
{
//Declaring the list of program class objects
List<Program> listofObjects = new List<Program>();
for (int i = 0; i < 4; i++)
{
Program pgmObj = new Program();
Console.WriteLine("Team Name");
pgmObj.teamName = Console.ReadLine();
Console.WriteLine("student Name");
pgmObj.studentName = Console.ReadLine();
Console.WriteLine("Old Average");
pgmObj.oldAverage = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("total socre");
pgmObj.totalScore = Convert.ToDouble(Console.ReadLine());
// Calculating the new average
pgmObj.newAverage = pgmObj.totalScore / 3;
//Adding the Program objects to the list
listofObjects.Add(pgmObj);
}
//writting the list of objects one by one to the text
document
using (var writer = new StreamWriter("C:\\doc.txt"))
{
// Loop through 4 variables
for (int i = 0; i < 4; i++)
{
writer.Write(listofObjects[i].teamName + "\r\n" +
listofObjects[i].studentName + "\r\n"+"Last week's avaerage" +
listofObjects[i].oldAverage+"\r\n" +"Today's average" +
listofObjects[i].newAverage + "\r\n" );
writer.Write("\r\n");
}
}
}
}
}
Lightening Lanes Case Study Problem Statements On Tuesday afternoons, Lightening Lanes Bowling Alley runs a special...
Write a C program to compute average grades for a course. The course records are in a single file and are organized according to the following format: Each line contains a student’s first name, then one space, then the student’s last name, then one space, then some number of quiz scores that, if they exist, are separated by one space. Each student will have zero to ten scores, and each score is an integer not greater than 100. Your program...
Write a complete C++ program that reads students names and their test scores from an input text file. The program should output each student’s name followed by the test scores and the relevant grade in an output text file. It should also find and display on screen the highest/lowest test score and the name of the students having the highest/lowest test score, average and variance of all test scores. Student data obtained from the input text file should be stored...
CIS 22A C++ Project Exam Statistics Here is what your program will do: first it welcomes the user and displays the purpose of the program. It then prompts the user to enter the name of an input file (such as scores.txt). Assume the file contains the scores of the final exams; each score is preceded by a 5 characters student id. Create the input file: copy and paste the following data into a new text file named scores.txt DH232 89...
In this assignment, you will write a program in C++ which uses files and nested loops to create a file from the quiz grades entered by the user, then reads the grades from the file and calculates each student’s average grade and the average quiz grade for the class. Each student takes 6 quizzes (unknown number of students). Use a nested loop to write each student’s quiz grades to a file. Then read the data from the file in order...
THIS IS FINAL COURSE ASSIGNMENT, PLEASE FOLLOW ALL
REQUIREMENTS.
Hello, please help write program in JAVA that
reads students’ names followed by their test scores from
"data.txt" file. The program should output
"out.txt" file where each student’s name is followed by
the test scores and the relevant grade, also find and print the
highest test score and the name of the students having the highest
test score.
Student data should be stored in an instance of
class variable of type...
have to create five different functions above and call it in the
main fucntion.
Project Exam Statistics A CIS 22A class has two midterm exams with a score between 0 and 100 each. Fractional scores, such as 88.3 are not allowed. The students' ids and midterm exam scores are stored in a text file as shown below // id exam1 exam2 DH232 89 92 Write a program that reads data from an input file named exams.txt, calculates the average of...
Question: Case Study Baseball Team Manager For this case study, you’ll use the programming skills that you ... Case Study Baseball Team Manager For this case study, you'll use the programming skills that you learn in Murach s Python Programming to develop a program that helps a person manage a baseball team. This program stores the data for each player on the team, and it also lets the manager set a starting lineup for each game After you read chapter...
Assignment W3-2 This programming assignment addresses: •Compiling and Executing an App with more than 1 class •Initializing Objects using Constructors •Software Engineering with Private Instances Variables and Public Set/Get Methods •Uses Methods inside classes Description: You are asked to write a program to process two students’ scores. Each student will have scores for 3 tests, the user will input each student’s full name followed by their three scores. When the data for the two students are read from the keyboard,...
Using C++. Please Provide 4 Test Cases.
Test #
Valid / Invalid Data
Description of test
Input Value
Actual Output
Test Pass / Fail
1
Valid
Pass
2
Valid
Pass
3
Valid
Pass
4
Valid
Pass
Question 2 Consider a file with the following student information: John Smith 99 Sarah Johnson 85 Jim Robinson 70 Mary Anderson 100 Michael Jackson 92 Each line in the file contains the first name, last name, and test score of a student. Write a...
C++ Homework Help:
The text file that it wants you to download is this:
Name: Peter Parker
CSCI-261: 95
CSCI-262: 90.625
CSCI-442: 91.20
Name: Mary Smith
CSCI-442: 65.0
CSCI-562: 79.1234
CSCI-580: 70.24
Name: Pat Brown
CSCI-562: 95
CSCI-565: 88.0
CSCI-580: 91.20
Name: Linda Williams
CSCI-262: 65.0
CSCI-306: 67.719
CSCI-562: 70.200
Name: John Miller
CSCI-261: 95.281
CSCI-306: 90.625
CSCI-565: 91.20
Name: Patricia Johnson
CSCI-306: 65.012
CSCI-442: 84.76
CSCI-580: 70
Name: Brian Hall
CSCI-261: 65.0
CSCI-306: 84.712
CSCI-442: 75.24
Name: Sandra Nelson...