Update MP4

This commit is contained in:
2022-11-17 17:00:33 -06:00
parent 1fdcdabcbe
commit 2be3b984a3
49 changed files with 329 additions and 128 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -31,13 +31,13 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.testScoresListBox = new System.Windows.Forms.ListBox();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.highestScoreTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.lowestScoreTextBox = new System.Windows.Forms.TextBox();
this.averageScoreTextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.getScoresButton = new System.Windows.Forms.Button();
this.exitButton = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@@ -49,7 +49,7 @@
this.groupBox1.Size = new System.Drawing.Size(199, 181);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
this.groupBox1.Text = "Test Scores";
//
// testScoresListBox
//
@@ -69,12 +69,13 @@
this.label1.TabIndex = 1;
this.label1.Text = "Highest Score:";
//
// textBox1
// highestScoreTextBox
//
this.textBox1.Location = new System.Drawing.Point(307, 37);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(126, 23);
this.textBox1.TabIndex = 2;
this.highestScoreTextBox.Location = new System.Drawing.Point(307, 37);
this.highestScoreTextBox.Name = "highestScoreTextBox";
this.highestScoreTextBox.ReadOnly = true;
this.highestScoreTextBox.Size = new System.Drawing.Size(126, 23);
this.highestScoreTextBox.TabIndex = 2;
//
// label2
//
@@ -85,19 +86,21 @@
this.label2.TabIndex = 3;
this.label2.Text = "Lowest Score:";
//
// textBox2
// lowestScoreTextBox
//
this.textBox2.Location = new System.Drawing.Point(307, 80);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(126, 23);
this.textBox2.TabIndex = 4;
this.lowestScoreTextBox.Location = new System.Drawing.Point(307, 80);
this.lowestScoreTextBox.Name = "lowestScoreTextBox";
this.lowestScoreTextBox.ReadOnly = true;
this.lowestScoreTextBox.Size = new System.Drawing.Size(126, 23);
this.lowestScoreTextBox.TabIndex = 4;
//
// textBox3
// averageScoreTextBox
//
this.textBox3.Location = new System.Drawing.Point(307, 120);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(126, 23);
this.textBox3.TabIndex = 5;
this.averageScoreTextBox.Location = new System.Drawing.Point(307, 120);
this.averageScoreTextBox.Name = "averageScoreTextBox";
this.averageScoreTextBox.ReadOnly = true;
this.averageScoreTextBox.Size = new System.Drawing.Size(126, 23);
this.averageScoreTextBox.TabIndex = 5;
//
// label3
//
@@ -108,38 +111,38 @@
this.label3.TabIndex = 6;
this.label3.Text = "Average Score:";
//
// button1
// getScoresButton
//
this.button1.Location = new System.Drawing.Point(136, 213);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 7;
this.button1.Text = "Get Scores";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
this.getScoresButton.Location = new System.Drawing.Point(136, 213);
this.getScoresButton.Name = "getScoresButton";
this.getScoresButton.Size = new System.Drawing.Size(75, 23);
this.getScoresButton.TabIndex = 7;
this.getScoresButton.Text = "Get Scores";
this.getScoresButton.UseVisualStyleBackColor = true;
this.getScoresButton.Click += new System.EventHandler(this.getScoresButton_Click);
//
// button2
// exitButton
//
this.button2.Location = new System.Drawing.Point(218, 213);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 8;
this.button2.Text = "Exit";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
this.exitButton.Location = new System.Drawing.Point(218, 213);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(75, 23);
this.exitButton.TabIndex = 8;
this.exitButton.Text = "Exit";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(445, 248);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.getScoresButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.averageScoreTextBox);
this.Controls.Add(this.lowestScoreTextBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.highestScoreTextBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.groupBox1);
this.Name = "Form1";
@@ -155,12 +158,12 @@
private GroupBox groupBox1;
private ListBox testScoresListBox;
private Label label1;
private TextBox textBox1;
private TextBox highestScoreTextBox;
private Label label2;
private TextBox textBox2;
private TextBox textBox3;
private TextBox lowestScoreTextBox;
private TextBox averageScoreTextBox;
private Label label3;
private Button button1;
private Button button2;
private Button getScoresButton;
private Button exitButton;
}
}

View File

@@ -6,13 +6,130 @@ namespace lab7_2_CalebFontenot
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
/*
* The Average method accepts an int array argument
* and returns the Average of the values in the array.
*/
static private double Average(int[] iArray)
{
int total = 0; // Accumulator, initialized to 0
double average; // To hold the average
// Step through the array, adding each element to the accumulator.
for (int index = 0; index < iArray.Length; index++)
{
total += iArray[index];
}
// Calculate the average.
average = (double) total / iArray.Length;
// Return the average.
return average;
}
private void button2_Click(object sender, EventArgs e)
/*
* The Highest method accepts an int array argument
* and returns the highest value in that array.
*/
static private int Highest(int[] iArray)
{
// Declare a variable to hold the highest value, and initialize it with the first value in the array.
int highest = iArray[0];
/*
* Step through the rest of the array, beginning at
* element 1. When a value greater than the highest
* is found, assign that value to the highest.
*/
for (int index = 1; index < iArray.Length; index++)
{
if (iArray[index] > highest)
{
highest = iArray[index];
}
}
// Return the highest value.
return highest;
}
/*
* The Lowest method accepts an int array argument
* and returns the lowest value in that array.
*/
static private int Lowest(int[] iArray)
{
// Declare a variable to hold the lowest value, and initialize it witth the first value in the array.
int lowest = iArray[0];
/*
* Step through the rest of the array, beginning at
* element 1. When a value greater than the lowest
* is found, assign that value to the lowest.
*/
for (int index = 1; index < iArray.Length; index++)
{
if (iArray[index] < lowest)
{
lowest = iArray[index];
}
}
// Return the lowest value.
return lowest;
}
private void getScoresButton_Click(object sender, EventArgs e)
{
try
{
// Local variables
const int SIZE = 5; // Number of tests
int[] scores = new int[SIZE]; // Array of test scores
int index = 0; // Loop counter
int highestScore; // To hold the highest score
int lowestScore; // To hold the lowest score
double averageScore; // To hold the average score
StreamReader inputFile; // For file input
// Open the file and get a StreamReader object.
inputFile = File.OpenText("TestScores.txt");
// Read the test scores into the array.
while (!inputFile.EndOfStream && index < scores.Length)
{
scores[index] = int.Parse(inputFile.ReadLine());
index++;
}
// Close the file.
inputFile.Close();
//Display the test scores.
foreach (int value in scores)
{
testScoresListBox.Items.Add(value);
}
// Get the highest, lowest, and average scores.
highestScore = Highest(scores);
lowestScore = Lowest(scores);
averageScore = Average(scores);
// Display the values.
highestScoreTextBox.Text = highestScore.ToString();
lowestScoreTextBox.Text = lowestScore.ToString();
averageScoreTextBox.Text = averageScore.ToString();
}
catch (Exception ex)
{
// Display an error message.
MessageBox.Show(ex.Message);
}
}
private void exitButton_Click(object sender, EventArgs e)
{
this.Close();
}

View File

@@ -0,0 +1,5 @@
100
70
85
32
47

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"lab7_2_CalebFontenot/1.0.0": {
"runtime": {
"lab7_2_CalebFontenot.dll": {}
}
}
}
},
"libraries": {
"lab7_2_CalebFontenot/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@@ -0,0 +1,15 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "6.0.0"
}
]
}
}

View File

@@ -13,4 +13,4 @@ build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = lab7_2_CalebFontenot
build_property.ProjectDir = Z:\media\DataEXT4\Documents\ASDV C#\lab7_1\lab7_2_CalebFontenot\
build_property.ProjectDir = Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\

View File

@@ -0,0 +1 @@
1dd964c79f11f9a4b70aacace6f46207eb1b2f42

View File

@@ -0,0 +1,17 @@
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\bin\Debug\net6.0-windows\lab7_2_CalebFontenot.exe
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\bin\Debug\net6.0-windows\lab7_2_CalebFontenot.deps.json
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\bin\Debug\net6.0-windows\lab7_2_CalebFontenot.runtimeconfig.json
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\bin\Debug\net6.0-windows\lab7_2_CalebFontenot.dll
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\bin\Debug\net6.0-windows\lab7_2_CalebFontenot.pdb
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.csproj.AssemblyReference.cache
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.Form1.resources
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.csproj.GenerateResource.cache
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.GeneratedMSBuildEditorConfig.editorconfig
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.AssemblyInfoInputs.cache
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.AssemblyInfo.cs
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.csproj.CoreCompileInputs.cache
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.dll
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\refint\lab7_2_CalebFontenot.dll
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.pdb
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\lab7_2_CalebFontenot.genruntimeconfig.cache
Z:\home\caleb\Documents\ASDV-C-Sharp\lab7_1\lab7_2_CalebFontenot\obj\Debug\net6.0-windows\ref\lab7_2_CalebFontenot.dll

View File

@@ -13,7 +13,8 @@
],
"additionalProbingPaths": [
"C:\\Users\\caleb\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\caleb\\.nuget\\packages"
"C:\\Users\\caleb\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true

View File

@@ -0,0 +1 @@
de85a5f1a8d395d1643857f4689f29dee34aa2cb

View File

@@ -1,20 +1,24 @@
{
"format": 1,
"restore": {
"Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj": {}
"Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj": {}
},
"projects": {
"Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj": {
"Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectUniqueName": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectName": "lab7_2_CalebFontenot",
"projectPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"packagesPath": "C:\\Users\\caleb\\.nuget\\packages\\",
"outputPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\obj\\",
"outputPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\caleb\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
@@ -58,7 +62,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
}
}
}

View File

@@ -5,11 +5,12 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\caleb\.nuget\packages\</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\caleb\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\caleb\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@@ -8,19 +8,24 @@
"net6.0-windows7.0": []
},
"packageFolders": {
"C:\\Users\\caleb\\.nuget\\packages\\": {}
"C:\\Users\\caleb\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectUniqueName": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectName": "lab7_2_CalebFontenot",
"projectPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"packagesPath": "C:\\Users\\caleb\\.nuget\\packages\\",
"outputPath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\obj\\",
"outputPath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\caleb\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
@@ -64,7 +69,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
}
}
}

View File

@@ -1,8 +1,8 @@
{
"version": 2,
"dgSpecHash": "5J4rYSZtoSxlG1DaMPwwZ+Ympx1HPEVYllSaEmeKWH1iVQKxAuDBb/QBN2/BK4xaH4OGEpHO8z/NkmOk41WgXw==",
"dgSpecHash": "+J4E6RdADOWUGIDccQTG+d0JkS7wD5bfT4uPXHD0nDdjVZ3KVfZrYkWEMRgmyx11OOdeGQEFJmQrxftoi1t5SA==",
"success": true,
"projectFilePath": "Z:\\media\\DataEXT4\\Documents\\ASDV C#\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"projectFilePath": "Z:\\home\\caleb\\Documents\\ASDV-C-Sharp\\lab7_1\\lab7_2_CalebFontenot\\lab7_2_CalebFontenot.csproj",
"expectedPackageFiles": [],
"logs": []
}