1) For an orbit with perigee altitude of 300 km and apogee altitude of 800 km, what is the magnitude of the position vector (in km) when the spacecraft has just passed perigee by 30 deg? 2) The...

1 answer below »
DUMMY


1) For an orbit with perigee altitude of 300 km and apogee altitude of 800 km, what is the magnitude of the position vector (in km) when the spacecraft has just passed perigee by 30 deg? 2) The NPSAT-1 satellite was launched in June 2019 into a circular orbit of 720 km altitude by 24 deg inclination. What is its period in seconds? 3) For a spacecraft orbiting the earth with perigee altitude of 250 km and apogee altitude of 26,500 km, what is its specific mechanical energy (km2/sec2)? 4) (Not the same as previous question) For a spacecraft orbiting the earth with pergee altitude of 250 km and apogee altitude of 28,000 km. If the spacecraft's distance from earth's center is 30,000 km, what is its velocity in km/sec? 5) For a geosynchronous orbit (circular orbit) with period of 23 hours, 56 minutes, what is its semimajor axis in kilometers? 6) A Hohmann transfer is used to move a spacecraft from a circular orbit altitude of 225 km to a co-planar circular orbit altitude of 3500 km. What is the Total ΔV in meters per sec for the maneuver? 7) A spacecraft is in a circular orbit at 400 km altitude and 26 deg inclination. In order to make a simple plane change of the orbit to a 51.6 deg inclination, what is the magnitude in kilometers per second of the ΔV for the maneuver? lab05-et1aikxj.pdf Programming Fundamentals Lab 05 Exercise 1 Exercise 1 will involve working with radio buttons, group boxes and check boxes…. Create a new C# Windows Forms App project called Lab05-1. 1. Follow the instructions below to create three group boxes containing 2 and 3 radio buttons and 3 check boxes respectively, one button, three labels and a list box on the screen and arrange them to appear as follows: 2. Click on the form and change its text property to Profile by changing its text property in the properties window. Always do this for every form. 3. Drag all controls onto the form, giving each an appropriate name by changing its name property in the properties window. For groups, drag a group box first and then drag the appropriate controls onto it. Remember: Use 3-letter prefixes before each name – use lbl, btn, lst, grp, chk and rad respectively for label, button, list box, group, check boxes and radio buttons. 4. Change the text properties of the controls to read as outlined on the screen above – Ask, if you are stuck!!! 5. Change the enabled properties to false for each of the controls:  Age group box  Replies group box  Summarise button 6. When the program runs, the user will select the Male or Female from the Gender group box, at which point two things happen (which you must code for each radio button!) Programming Fundamentals a. First, either “You selected Male” or “You selected Female” appears in the Gender label. So, for the appropriate radio button, use the line: lblGender.Text = “You selected……”; b. Secondly, the Age group box becomes enabled on the screen (So, in the code for each radio button, use the following line for the Age group) grpAge.Enabled = true; 7. Now, the user selects one of the categories from the Age group box and this choice is now copied into the Age label. Hint: For each of the radio buttons in the Age group, code a line with text similar to: lblAge.Text = “You are…… ”; Also, for each radio button in the Age group box, make the Summarise button enabled using the line: btnSummarise.Enabled = true; 8. When the button Summarise is clicked, the text in the Gender label and the Age label should be copied into the list box and the Replies group box should be enabled. The code for the gender label is as follows: lstSummary.Items.Add(lblGender.Text); 9. Finally, when the user checks any of the check boxes, the corresponding checks text should be copied to the Summary list box as indicated in the below image. The code for the first check box is as follows: if (chkDrives.Checked == true) { lstSummary.Items.Add(chkDrives.Text); } You might notice that by default the Male radio button is checked. To stop this from happening set the Checked property (in the Appearance section in properties) to False for both the Male AND female radio buttons (even if they are already false). Programming Fundamentals Exercise 2 Create a new C# Windows Forms App project called Lab05-2. 1. Follow the instructions below to create 4 labels, 4 text boxes an a button on the screen and arrange them to appear as follows: 2. Ensure to name all controls according to the correct convention (Labels starting with lbl, text boxes starting with txt & buttons starting with btn). 3. Make the labels bold. 4. Make the text box for Grade read only and its background white (Highlight Text is a good background colour for the text boxes). 5. When the Calculate Grade button is clicked the correct grade should be displayed in the Grade text box. The grade should be calculated as follows: Exam Mark Entered Grade Over 100 or Below 0 Invalid 85 or above A 70 to 84 B 55 to 69 C 40 to 54 D 39 or below E Hint: Get the value out of the text box first and then start by comparing it to 100 & 0. double mark = double.Parse(txtMark.Text); if (mark < 0="" ||="" mark=""> 100) { // set Grade text to Invalid } else if( mark >= 85) { Programming Fundamentals Exercise 3 Create a new C# Windows Forms App project called Lab05-3. 1. Follow the instructions below to create 4 labels, 4 text boxes and a button on the screen and arrange them to appear as follows: 2. Ensure to name all controls according to the correct convention (Labels starting with lbl, text boxes starting with txt & buttons starting with btn). 3. Make the labels bold. 4. Make the text boxes for Price, Vat & Total Price read only and their background white (Highlight Text is a good background colour for the text boxes). When the Calculate Price button is clicked the following should occur: 1. The price before VAT should be calculated and put in the Price text box (see below for details). 2. The VAT amount should be calculated (21% of the Price) and put in the VAT text box. 3. The total cost should be calculated (Price plus Vat) in total price text box. Remember all prices should be in decimal format. A copying centre charges 10c per copy for the first 100 copies, 6c for each additional copy up to and including 200 copies and 4c for each additional copy thereafter. (These prices are before VAT). CALCULATIONS: If number of copies is <= 100="" multiply="" by="" 0.1="" to="" get="" the="" cost="" in="" euro="" &="" cent.="" otherwise="" if="" number="" of="" copies="" is="" less="" than="" or="" equal="" to="" 200="" minus="" 100="" from="" the="" number="" of="" copies="" and="" multiply="" that="" by="" 0.06="" and="" then="" add="" 10,="" because="" the="" first="" 100="" copies="" cost="" 10="" cent="" each="" which="" is="" a="" total="" of="" €10.="" programming="" fundamentals="" otherwise="" minus="" 200="" from="" the="" number="" of="" copies="" and="" multiply="" that="" by="" 0.04="" and="" then="" add="" 16,="" because="" the="" first="" 100="" copies="" cost="" 10="" cent="" each="" which="" is="" a="" total="" of="" €10="" and="" the="" next="" 100="" copies="" cos="" 6c="" each="" which="" is="" a="" total="" of="" €6="" the="" code="" starts="" like="" this:="" int="" copies="int.Parse(txtNumCopies.Text);" double="" price="0;" if(copies=""><=100) {="" price="copies" *="" 0.1;="" }="" else="" if="" (copies=""><=200) { copies = copies – 100; price = copies * 0.06 + 10; } … programming fundamentals exercise 4 create a new c# windows forms app project called lab05-4. 1. follow the instructions below to create 4 labels, 4 text boxes and a button on the screen and arrange them to appear as follows: 1. ensure to name all controls according to the correct convention (labels starting with lbl, text boxes starting with txt & buttons starting with btn). 2. make the labels bold. 3. when the outcome button is clicked the outcome label (below the outcome button) should state the following a. if the expenditure is greater than the income, the label should output: “you made a loss of nnnn”, where nnnn is the amount of loss. b. if the income is greater than the expenditure, the label should output: “you made a profit of nnnn”, where nnnn is the amount of profit. c. otherwise (if the income and expenditure is the same), the label should output: “you broke even”. see below for examples programming fundamentals lab06-qy5oj2bn.pdf programming fundamentals lab 06 these exercises involve working with loops. exercise 1 create a new c# windows forms app project called lab06-1. follow the instructions below to create one label, one text box, four buttons and one list box on the screen and arrange them to appear as follows: 1. click on the form and change its text property to timestables by changing its text property in the properties window. always do this for every form. 2. drag all controls onto the form, giving each an appropriate name by changing its name property in the properties window. remember: use 3-letter prefixes before each name. 3. change the text properties of the controls so that they look like the above. 4. change the property textalign (under appearance) to right for the number text box. 5. when for button is clicked the times tables will display in the list box for the number input to the number text box using a for loop (see below image for sample output). 6. when while button is clicked the times tables will display in the list box for the number input to the number text box using a while loop (see below image {="" copies="copies" –="" 100;="" price="copies" *="" 0.06="" +="" 10;="" }="" …="" programming="" fundamentals="" exercise="" 4="" create="" a="" new="" c#="" windows="" forms="" app="" project="" called="" lab05-4.="" 1.="" follow="" the="" instructions="" below="" to="" create="" 4="" labels,="" 4="" text="" boxes="" and="" a="" button="" on="" the="" screen="" and="" arrange="" them="" to="" appear="" as="" follows:="" 1.="" ensure="" to="" name="" all="" controls="" according="" to="" the="" correct="" convention="" (labels="" starting="" with="" lbl,="" text="" boxes="" starting="" with="" txt="" &="" buttons="" starting="" with="" btn).="" 2.="" make="" the="" labels="" bold.="" 3.="" when="" the="" outcome="" button="" is="" clicked="" the="" outcome="" label="" (below="" the="" outcome="" button)="" should="" state="" the="" following="" a.="" if="" the="" expenditure="" is="" greater="" than="" the="" income,="" the="" label="" should="" output:="" “you="" made="" a="" loss="" of="" nnnn”,="" where="" nnnn="" is="" the="" amount="" of="" loss.="" b.="" if="" the="" income="" is="" greater="" than="" the="" expenditure,="" the="" label="" should="" output:="" “you="" made="" a="" profit="" of="" nnnn”,="" where="" nnnn="" is="" the="" amount="" of="" profit.="" c.="" otherwise="" (if="" the="" income="" and="" expenditure="" is="" the="" same),="" the="" label="" should="" output:="" “you="" broke="" even”.="" see="" below="" for="" examples="" programming="" fundamentals="" lab06-qy5oj2bn.pdf="" programming="" fundamentals="" lab="" 06="" these="" exercises="" involve="" working="" with="" loops.="" exercise="" 1="" create="" a="" new="" c#="" windows="" forms="" app="" project="" called="" lab06-1.="" follow="" the="" instructions="" below="" to="" create="" one="" label,="" one="" text="" box,="" four="" buttons="" and="" one="" list="" box="" on="" the="" screen="" and="" arrange="" them="" to="" appear="" as="" follows:="" 1.="" click="" on="" the="" form="" and="" change="" its="" text="" property="" to="" timestables="" by="" changing="" its="" text="" property="" in="" the="" properties="" window.="" always="" do="" this="" for="" every="" form.="" 2.="" drag="" all="" controls="" onto="" the="" form,="" giving="" each="" an="" appropriate="" name="" by="" changing="" its="" name="" property="" in="" the="" properties="" window.="" remember:="" use="" 3-letter="" prefixes="" before="" each="" name.="" 3.="" change="" the="" text="" properties="" of="" the="" controls="" so="" that="" they="" look="" like="" the="" above.="" 4.="" change="" the="" property="" textalign="" (under="" appearance)="" to="" right="" for="" the="" number="" text="" box.="" 5.="" when="" for="" button="" is="" clicked="" the="" times="" tables="" will="" display="" in="" the="" list="" box="" for="" the="" number="" input="" to="" the="" number="" text="" box="" using="" a="" for="" loop="" (see="" below="" image="" for="" sample="" output).="" 6.="" when="" while="" button="" is="" clicked="" the="" times="" tables="" will="" display="" in="" the="" list="" box="" for="" the="" number="" input="" to="" the="" number="" text="" box="" using="" a="" while="" loop="" (see="" below="">
Answered 19 days AfterJun 19, 2021

Answer To: 1) For an orbit with perigee altitude of 300 km and apogee altitude of 800 km, what is the magnitude...

Nikita answered on Jul 08 2021
140 Votes
LabRevision-2/.vs/LabRevision-2/DesignTimeBuild/.dtbcache.v2
LabRevision-2/.vs/LabRevision-2/v16/.suo
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.deps.json
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"LabRevision-2/1.0.0": {
"runtime": {
"LabRevision-2.dll": {}
}
}
}
},
"libraries": {
"LabRevision-2/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.dll
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.exe
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.pdb
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.runtimeconfig.dev.json
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\Nikita\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Nikita\\.nuget\\packages"
]
}
}
LabRevision-2/bin/Debug/netcoreapp3.1/LabRevision-2.runtimeconfig.json
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
LabRevision-2/LabRevision-2.csproj


Exe
netcoreapp3.1
LabRevision_2


LabRevision-2/LabRevision-2.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabRevision-2", "LabRevision-2.csproj", "{A68091AC-2C96-4306-AF93-68B07D7B6F50}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {A68091AC-2C96-4306-AF93-68B07D7B6F50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {A68091AC-2C96-4306-AF93-68B07D7B6F50}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {A68091AC-2C96-4306-AF93-68B07D7B6F50}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {A68091AC-2C96-4306-AF93-68B07D7B6F50}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {DFEE56E5-8194-4E90-9602-E4F96536584F}
    EndGlobalSection
EndGlobal
LabRevision-2/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
//
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.AssemblyInfo.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//

//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LabRevision-2")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LabRevision-2")]
[assembly: System.Reflection.AssemblyTitleAttribute("LabRevision-2")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.AssemblyInfoInputs.cache
0a694002eaaf05d9b06b955139c9d943426bf6d4
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.assets.cache
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.csproj.CoreCompileInputs.cache
c42cec46acc6df9d62a866f58dd1d2eabe77a824
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.csproj.FileListAbsolute.txt
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.exe
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.deps.json
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.runtimeconfig.json
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.runtimeconfig.dev.json
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.dll
E:\GreyNodes Assignments\Lab_567\LabRevision-2\bin\Debug\netcoreapp3.1\LabRevision-2.pdb
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.csprojAssemblyReference.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.AssemblyInfoInputs.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.AssemblyInfo.cs
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.csproj.CoreCompileInputs.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.dll
E:\GreyNodes Assignments\Lab_567\LabRevision
-2\obj\Debug\netcoreapp3.1\LabRevision-2.pdb
E:\GreyNodes Assignments\Lab_567\LabRevision-2\obj\Debug\netcoreapp3.1\LabRevision-2.genruntimeconfig.cache
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.csprojAssemblyReference.cache
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.dll
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.exe
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.genruntimeconfig.cache
86c8e15dd33445635927cfaf398408205fd11473
LabRevision-2/obj/Debug/netcoreapp3.1/LabRevision-2.pdb
LabRevision-2/obj/LabRevision-2.csproj.nuget.dgspec.json
{
"format": 1,
"restore": {
"E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj": {}
},
"projects": {
"E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj",
"projectName": "LabRevision-2",
"projectPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj",
"packagesPath": "C:\\Users\\Nikita\\.nuget\\packages\\",
"outputPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Nikita\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.410\\RuntimeIdentifierGraph.json"
}
}
}
}
}
LabRevision-2/obj/LabRevision-2.csproj.nuget.g.props


True
NuGet
$(MSBuildThisFileDirectory)project.assets.json
$(UserProfile)\.nuget\packages\
C:\Users\Nikita\.nuget\packages\
PackageReference
5.7.0





$(MSBuildAllProjects);$(MSBuildThisFileFullPath)

LabRevision-2/obj/LabRevision-2.csproj.nuget.g.targets


$(MSBuildAllProjects);$(MSBuildThisFileFullPath)

LabRevision-2/obj/project.assets.json
{
"version": 3,
"targets": {
".NETCoreApp,Version=v3.1": {}
},
"libraries": {},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": []
},
"packageFolders": {
"C:\\Users\\Nikita\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj",
"projectName": "LabRevision-2",
"projectPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj",
"packagesPath": "C:\\Users\\Nikita\\.nuget\\packages\\",
"outputPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Nikita\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.410\\RuntimeIdentifierGraph.json"
}
}
}
}
LabRevision-2/obj/project.nuget.cache
{
"version": 2,
"dgSpecHash": "mHw8R2SySL/qCrtRW2gv6PRFnlw80o5BIiaDOGk8mQLj/bNE9jhXne1XX5PlT2dJs/GF07++DW4wOE+SKyAzAw==",
"success": true,
"projectFilePath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-2\\LabRevision-2.csproj",
"expectedPackageFiles": [],
"logs": []
}
LabRevision-2/Program.cs
using System;
namespace LabRevision_2
{
class Program
{
static void Main(string[] args)
{
int num1, num2, total=0;
Console.Write("Enter a whole number1 : ");
num1 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter a whole number2 : ");
num2 = Convert.ToInt32(Console.ReadLine());
if (num1 > num2)
Console.Write("Number 1 must be less than or equal to number 2");
else
{

while (num1 <= num2)
{
total = total+ num1;

num1++;
}
Console.Write(" Sum : "+total);
}
Console.ReadLine();
}
}
}
LabRevision-3/.vs/LabRevision-3/v16/.suo
LabRevision-3/App.config




LabRevision-3/bin/Debug/LabRevision-3.exe
LabRevision-3/bin/Debug/LabRevision-3.exe.config




LabRevision-3/bin/Debug/LabRevision-3.pdb
LabRevision-3/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LabRevision_3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
btnAddGrade.Enabled = false;
btnAverage.Enabled = false;
}
double grade;
private void txtGrade_TextChanged(object sender, EventArgs e)
{
btnAddGrade.Enabled = true;
}
private void btnAddGrade_Click(object sender, EventArgs e)
{
try
{
txtGrade.Focus();
grade = Convert.ToDouble(txtGrade.Text);
if (grade < 0 || grade > 100)
{
lblInvalidGrade.Visible = true;
lblInvalidGrade.Text = "Invalide Grade";
//lblInvalidGrade.ForeColor
}
else
{
lblInvalidGrade.Visible = false;
lstGrade.Items.Add(grade);
btnAverage.Enabled = true;
}
txtGrade.Text = string.Empty;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnAverage_Click(object sender, EventArgs e)
{
try {
if(lstGrade.Items.Count >0)
{
double total = 0;
foreach(double grade in lstGrade.Items)
{
total = total + grade;
}
double avg = total / lstGrade.Items.Count;
string avgDec = String.Format(" {0:0.00}", avg);
lblAverage.Text=string.Format("{0,-10} {1,49} ", "Average : ", ""+avgDec+"");
lblAverage.Visible = true;
}
else
{
lblAverage.Text = "No grades for average";
lblAverage.Visible = true;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnQuite_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
LabRevision-3/Form1.Designer.cs
namespace LabRevision_3
{
partial class Form1
{
///
/// Required designer variable.
///

private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///

/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.lblGrade = new System.Windows.Forms.Label();
this.txtGrade = new System.Windows.Forms.TextBox();
this.btnAddGrade = new System.Windows.Forms.Button();
this.btnQuite = new System.Windows.Forms.Button();
this.btnAverage = new System.Windows.Forms.Button();
this.lstGrade = new System.Windows.Forms.ListBox();
this.lblTitle = new System.Windows.Forms.Label();
this.lblInvalidGrade = new System.Windows.Forms.Label();
this.lblAverage = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblGrade
//
this.lblGrade.AutoSize = true;
this.lblGrade.Location = new System.Drawing.Point(12, 56);
this.lblGrade.Name = "lblGrade";
this.lblGrade.Size = new System.Drawing.Size(166, 40);
this.lblGrade.TabIndex = 0;
this.lblGrade.Text = "Enter Exam Grade\r\n(Beetween 1 and 100)";
//
// txtGrade
//
this.txtGrade.Location = new System.Drawing.Point(241, 56);
this.txtGrade.Name = "txtGrade";
this.txtGrade.Size = new System.Drawing.Size(218, 26);
this.txtGrade.TabIndex = 1;
this.txtGrade.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.txtGrade.TextChanged += new System.EventHandler(this.txtGrade_TextChanged);
//
// btnAddGrade
//
this.btnAddGrade.Location = new System.Drawing.Point(276, 128);
this.btnAddGrade.Name = "btnAddGrade";
this.btnAddGrade.Size = new System.Drawing.Size(123, 52);
this.btnAddGrade.TabIndex = 2;
this.btnAddGrade.Text = "Add Grade";
this.btnAddGrade.UseVisualStyleBackColor = true;
this.btnAddGrade.Click += new System.EventHandler(this.btnAddGrade_Click);
//
// btnQuite
//
this.btnQuite.Location = new System.Drawing.Point(276, 271);
this.btnQuite.Name = "btnQuite";
this.btnQuite.Size = new System.Drawing.Size(123, 52);
this.btnQuite.TabIndex = 4;
this.btnQuite.Text = "Quit";
this.btnQuite.UseVisualStyleBackColor = true;
this.btnQuite.Click += new System.EventHandler(this.btnQuite_Click);
//
// btnAverage
//
this.btnAverage.Location = new System.Drawing.Point(276, 186);
this.btnAverage.Name = "btnAverage";
this.btnAverage.Size = new System.Drawing.Size(123, 52);
this.btnAverage.TabIndex = 3;
this.btnAverage.Text = "Show Average";
this.btnAverage.UseVisualStyleBackColor = true;
this.btnAverage.Click += new System.EventHandler(this.btnAverage_Click);
//
// lstGrade
//
this.lstGrade.FormattingEnabled = true;
this.lstGrade.ItemHeight = 20;
this.lstGrade.Location = new System.Drawing.Point(465, 56);
this.lstGrade.Name = "lstGrade";
this.lstGrade.Size = new System.Drawing.Size(323, 244);
this.lstGrade.TabIndex = 5;
//
// lblTitle
//
this.lblTitle.Dock = System.Windows.Forms.DockStyle.Top;
this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTitle.Location = new System.Drawing.Point(0, 0);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(800, 46);
this.lblTitle.TabIndex = 6;
this.lblTitle.Text = "Average Grade Calculator";
this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblInvalidGrade
//
this.lblInvalidGrade.AutoSize = true;
this.lblInvalidGrade.ForeColor = System.Drawing.Color.Red;
this.lblInvalidGrade.Location = new System.Drawing.Point(272, 94);
this.lblInvalidGrade.Name = "lblInvalidGrade";
this.lblInvalidGrade.Size = new System.Drawing.Size(0, 20);
this.lblInvalidGrade.TabIndex = 7;
//
// lblAverage
//
this.lblAverage.AutoSize = true;
this.lblAverage.Location = new System.Drawing.Point(461, 303);
this.lblAverage.Name = "lblAverage";
this.lblAverage.Size = new System.Drawing.Size(0, 20);
this.lblAverage.TabIndex = 8;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.lblAverage);
this.Controls.Add(this.lblInvalidGrade);
this.Controls.Add(this.lblTitle);
this.Controls.Add(this.lstGrade);
this.Controls.Add(this.btnAverage);
this.Controls.Add(this.btnQuite);
this.Controls.Add(this.btnAddGrade);
this.Controls.Add(this.txtGrade);
this.Controls.Add(this.lblGrade);
this.Name = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblGrade;
private System.Windows.Forms.TextBox txtGrade;
private System.Windows.Forms.Button btnAddGrade;
private System.Windows.Forms.Button btnQuite;
private System.Windows.Forms.Button btnAverage;
private System.Windows.Forms.ListBox lstGrade;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.Label lblInvalidGrade;
private System.Windows.Forms.Label lblAverage;
}
}
LabRevision-3/Form1.resx

















































text/microsoft-resx


2.0


System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089


System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

LabRevision-3/LabRevision-3.csproj



Debug
AnyCPU
{E54E06E9-EA61-49C5-8B98-76A594527366}
WinExe
LabRevision_3
LabRevision-3
v4.7.2
512
true
true


AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4


AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
















Form


Form1.cs




Form1.cs


ResXFileCodeGenerator
Resources.Designer.cs
Designer


True
Resources.resx


SettingsSingleFileGenerator
Settings.Designer.cs


True
Settings.settings
True






LabRevision-3/LabRevision-3.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabRevision-3", "LabRevision-3.csproj", "{E54E06E9-EA61-49C5-8B98-76A594527366}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {E54E06E9-EA61-49C5-8B98-76A594527366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {E54E06E9-EA61-49C5-8B98-76A594527366}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {E54E06E9-EA61-49C5-8B98-76A594527366}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {E54E06E9-EA61-49C5-8B98-76A594527366}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {80A19995-F881-466F-88E7-5AF8076CBE34}
    EndGlobalSection
EndGlobal
LabRevision-3/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
//
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
LabRevision-3/obj/Debug/DesignTimeResolveAssemblyReferences.cache
LabRevision-3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
LabRevision-3/obj/Debug/LabRevision-3.csproj.CoreCompileInputs.cache
8069502011d0681850e57a53d5a1673222f430a6
LabRevision-3/obj/Debug/LabRevision-3.csproj.FileListAbsolute.txt
E:\GreyNodes Assignments\Lab_567\LabRevision-3\bin\Debug\LabRevision-3.exe.config
E:\GreyNodes Assignments\Lab_567\LabRevision-3\bin\Debug\LabRevision-3.exe
E:\GreyNodes Assignments\Lab_567\LabRevision-3\bin\Debug\LabRevision-3.pdb
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision-3.csprojAssemblyReference.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision_3.Form1.resources
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision_3.Properties.Resources.resources
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision-3.csproj.GenerateResource.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision-3.csproj.CoreCompileInputs.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision-3.exe
E:\GreyNodes Assignments\Lab_567\LabRevision-3\obj\Debug\LabRevision-3.pdb
LabRevision-3/obj/Debug/LabRevision-3.csproj.GenerateResource.cache
LabRevision-3/obj/Debug/LabRevision-3.csprojAssemblyReference.cache
LabRevision-3/obj/Debug/LabRevision-3.exe
LabRevision-3/obj/Debug/LabRevision-3.pdb
LabRevision-3/obj/Debug/LabRevision_3.Form1.resources
LabRevision-3/obj/Debug/LabRevision_3.Properties.Resources.resources
LabRevision-3/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LabRevision_3
{
static class Program
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
LabRevision-3/Properties/AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LabRevision-3")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyProduct("LabRevision-3")]
[assembly: AssemblyCopyright("Copyright © HP Inc. 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e54e06e9-ea61-49c5-8b98-76a594527366")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
LabRevision-3/Properties/Resources.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//

//------------------------------------------------------------------------------
namespace LabRevision_3.Properties
{
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///

// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
///
/// Returns the cached ResourceManager instance used by this class.
///

[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LabRevision_3.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///

[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
LabRevision-3/Properties/Resources.resx














































text/microsoft-resx


2.0


System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089


System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

LabRevision-3/Properties/Settings.Designer.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//

//------------------------------------------------------------------------------
namespace LabRevision_3.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
LabRevision-3/Properties/Settings.settings





LabRevision-4/.vs/LabRevision-4/DesignTimeBuild/.dtbcache.v2
LabRevision-4/.vs/LabRevision-4/v16/.suo
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.deps.json
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"LabRevision-4/1.0.0": {
"runtime": {
"LabRevision-4.dll": {}
}
}
}
},
"libraries": {
"LabRevision-4/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.dll
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.exe
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.pdb
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.runtimeconfig.dev.json
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\Nikita\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Nikita\\.nuget\\packages"
]
}
}
LabRevision-4/bin/Debug/netcoreapp3.1/LabRevision-4.runtimeconfig.json
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
LabRevision-4/LabRevision-4.csproj


Exe
netcoreapp3.1
LabRevision_4


LabRevision-4/LabRevision-4.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabRevision-4", "LabRevision-4.csproj", "{D8BA7BAF-EC4D-4FF2-99CB-07828765BF8F}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {D8BA7BAF-EC4D-4FF2-99CB-07828765BF8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {D8BA7BAF-EC4D-4FF2-99CB-07828765BF8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {D8BA7BAF-EC4D-4FF2-99CB-07828765BF8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {D8BA7BAF-EC4D-4FF2-99CB-07828765BF8F}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {F39F561B-06A3-4472-9DD1-ED140D49B9D5}
    EndGlobalSection
EndGlobal
LabRevision-4/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
//
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.AssemblyInfo.cs
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//

//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LabRevision-4")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LabRevision-4")]
[assembly: System.Reflection.AssemblyTitleAttribute("LabRevision-4")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.AssemblyInfoInputs.cache
3eafdce8490837fd298723d5df60076c934f636f
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.assets.cache
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.csproj.CoreCompileInputs.cache
8847b90058e1488210c8465b434bc6dae6a7501b
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.csproj.FileListAbsolute.txt
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.exe
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.deps.json
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.runtimeconfig.json
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.runtimeconfig.dev.json
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.dll
E:\GreyNodes Assignments\Lab_567\LabRevision-4\bin\Debug\netcoreapp3.1\LabRevision-4.pdb
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.csprojAssemblyReference.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.AssemblyInfoInputs.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.AssemblyInfo.cs
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.csproj.CoreCompileInputs.cache
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.dll
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.pdb
E:\GreyNodes Assignments\Lab_567\LabRevision-4\obj\Debug\netcoreapp3.1\LabRevision-4.genruntimeconfig.cache
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.csprojAssemblyReference.cache
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.dll
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.exe
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.genruntimeconfig.cache
86c8e15dd33445635927cfaf398408205fd11473
LabRevision-4/obj/Debug/netcoreapp3.1/LabRevision-4.pdb
LabRevision-4/obj/LabRevision-4.csproj.nuget.dgspec.json
{
"format": 1,
"restore": {
"E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj": {}
},
"projects": {
"E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj",
"projectName": "LabRevision-4",
"projectPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj",
"packagesPath": "C:\\Users\\Nikita\\.nuget\\packages\\",
"outputPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Nikita\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.410\\RuntimeIdentifierGraph.json"
}
}
}
}
}
LabRevision-4/obj/LabRevision-4.csproj.nuget.g.props


True
NuGet
$(MSBuildThisFileDirectory)project.assets.json
$(UserProfile)\.nuget\packages\
C:\Users\Nikita\.nuget\packages\
PackageReference
5.7.0





$(MSBuildAllProjects);$(MSBuildThisFileFullPath)

LabRevision-4/obj/LabRevision-4.csproj.nuget.g.targets


$(MSBuildAllProjects);$(MSBuildThisFileFullPath)

LabRevision-4/obj/project.assets.json
{
"version": 3,
"targets": {
".NETCoreApp,Version=v3.1": {}
},
"libraries": {},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": []
},
"packageFolders": {
"C:\\Users\\Nikita\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj",
"projectName": "LabRevision-4",
"projectPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj",
"packagesPath": "C:\\Users\\Nikita\\.nuget\\packages\\",
"outputPath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Nikita\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.410\\RuntimeIdentifierGraph.json"
}
}
}
}
LabRevision-4/obj/project.nuget.cache
{
"version": 2,
"dgSpecHash": "icXoSn8rLsjBIhLqXAIP5UT+jqz6Cc1+uIdtH3t7y4UnAfUkZQgeRLz/CBD/ro51pJvOdY0BFyU+Kemlr9c5Og==",
"success": true,
"projectFilePath": "E:\\GreyNodes Assignments\\Lab_567\\LabRevision-4\\LabRevision-4.csproj",
"expectedPackageFiles": [],
"logs": []
}
LabRevision-4/Program.cs
using System;
namespace LabRevision_4
{
public class ConstMessageClass
{
public const string ConstMessage = "This is a constant text message";
}
class Program
{
private static void printName(string name)
{
Console.Write(name);
}
static void Main(string[] args)
{

favColor(); //facColor_Method
printName("Name : Devin \n\n"); //printName_Method
double temp;
Program objProgram = new Program();
temp = objProgram.firstReturnMethod();
Console.Write("Anser(Substraction) : "+ temp +" \n\n"); //firstReturn_Method

Console.Write(objProgram.secondReturnMethod()+". \n\n"); //secondReturnMethod
parameterMethod( 10, 10); //parameter_Method
Console.WriteLine("Anser(Multiplication) : " +intReturn(3,3)+" \n"); //intReturn_Method

stringReturn( 204); //stringReturn_Method
Console.ReadLine();
}
private string secondReturnMethod()
{
string temp = ConstMessageClass.ConstMessage.ToString();
return temp;
}
private static string stringReturn(int value)
{
string output = "The number picked is " + value+"\n";
Console.Write(output);
return output;
}
private static int intReturn( int num1, int num2)
{
int result = num1 * num2;
return result;
}
private static void parameterMethod( int num1, int num2)
{
int result = num1 + num2;
Console.Write("Addition of two numbers : " + result +"\n\n");
}
public double firstReturnMethod()
{
double num1, num2, result;
Console.Write("Enter first numbers: ");
num1 = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter second numbers: ");
num2 = Convert.ToDouble(Console.ReadLine());
result = num2 - num1;

return result;
}

private static void favColor()
{
Console.Write("What is your favourite colour? ");
string favColorVar = Console.ReadLine();
Console.Write("Your favourite colour is " + favColorVar +"\n\n");
}

}
}
Lab05-1/.vs/Lab05-1/v16/.suo
Lab05-1/App.config




Lab05-1/bin/Debug/Lab05-1.exe
Lab05-1/bin/Debug/Lab05-1.exe.config




Lab05-1/bin/Debug/Lab05-1.pdb
Lab05-1/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lab05_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void rdpMale_CheckedChanged(object sender, EventArgs e)
{
lblGender.Text = "You Selected Male";
grpAge.Enabled = true;
}
private void rdoFemale_CheckedChanged(object sender, EventArgs e)
{
lblGender.Text = "You Selected Female";
grpAge.Enabled = true;
}
private void rdoUnder20_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You Selected Under 20";
btnSummerise.Enabled = true;
}
private void rdo20to60_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You Selected 20 to 60";
btnSummerise.Enabled = true;
}
private void rdoOver60_CheckedChanged(object sender, EventArgs e)
{
lblAge.Text = "You Selected Over 60";
btnSummerise.Enabled = true;
}
private void btnSummerise_Click(object sender, EventArgs e)
{
grpReplies.Enabled = true;
lst_Summaries.Items.Add(lblGender.Text);
lst_Summaries.Items.Add(lblAge.Text);
}
private void chlDrivesACar_CheckedChanged(object sender, EventArgs e)
{
if (chlDrivesACar.Checked == true)
{
lst_Summaries.Items.Add("Drives a Car");
}
}
private void chkOwnsaHouse_CheckedChanged(object sender, EventArgs e)
{
if (chkOwnsaHouse.Checked == true)
{
lst_Summaries.Items.Add("Owns a House");
}
}
private void chkOwnsaShares_CheckedChanged(object sender, EventArgs e)
{
if (chkOwnsaShares.Checked == true)
{
lst_Summaries.Items.Add("Owns Shares");
}
}
private void Form1_Load(object sender, EventArgs e)
{
rdoFemale.Checked = false;
rdoMale.Checked = false;
}
}
}
Lab05-1/Form1.Designer.cs
namespace Lab05_1
{
partial class Form1
{
///
/// Required designer variable.
///

private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///

/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.grpGender = new System.Windows.Forms.GroupBox();
this.grpAge = new System.Windows.Forms.GroupBox();
this.grpReplies = new System.Windows.Forms.GroupBox();
this.rdoMale = new System.Windows.Forms.RadioButton();
this.rdoFemale = new System.Windows.Forms.RadioButton();
this.rdoUnder20 = new System.Windows.Forms.RadioButton();
this.rdo20to60 = new System.Windows.Forms.RadioButton();
this.rdoOver60 = new System.Windows.Forms.RadioButton();
this.chlDrivesACar = new System.Windows.Forms.CheckBox();
this.chkOwnsaHouse = new System.Windows.Forms.CheckBox();
this.chkOwnsaShares = new System.Windows.Forms.CheckBox();
this.lblGender = new System.Windows.Forms.Label();
this.lblAge = new System.Windows.Forms.Label();
this.lblSummery = new System.Windows.Forms.Label();
this.btnSummerise = new System.Windows.Forms.Button();
this.lst_Summaries = new System.Windows.Forms.ListBox();
this.grpGender.SuspendLayout();
this.grpAge.SuspendLayout();
this.grpReplies.SuspendLayout();
this.SuspendLayout();
//
// grpGender
//
this.grpGender.Controls.Add(this.rdoFemale);
this.grpGender.Controls.Add(this.rdoMale);
this.grpGender.Location = new System.Drawing.Point(13, 13);
this.grpGender.Name = "grpGender";
this.grpGender.Size = new System.Drawing.Size(257, 145);
this.grpGender.TabIndex = 0;
this.grpGender.TabStop = false;
this.grpGender.Text = "Gender";
//
// grpAge
//
this.grpAge.Controls.Add(this.rdoOver60);
this.grpAge.Controls.Add(this.rdo20to60);
this.grpAge.Controls.Add(this.rdoUnder20);
this.grpAge.Enabled = false;
this.grpAge.Location = new System.Drawing.Point(276, 13);
this.grpAge.Name = "grpAge";
this.grpAge.Size = new System.Drawing.Size(227, 145);
this.grpAge.TabIndex = 1;
this.grpAge.TabStop = false;
this.grpAge.Text = "Age";
//
// grpReplies
//
this.grpReplies.Controls.Add(this.chkOwnsaShares);
this.grpReplies.Controls.Add(this.chkOwnsaHouse);
this.grpReplies.Controls.Add(this.chlDrivesACar);
this.grpReplies.Enabled = false;
this.grpReplies.Location = new System.Drawing.Point(13, 247);
this.grpReplies.Name = "grpReplies";
this.grpReplies.Size = new System.Drawing.Size(257, 145);
this.grpReplies.TabIndex = 1;
this.grpReplies.TabStop = false;
this.grpReplies.Text = "Replies";
//
// rdoMale
//
this.rdoMale.AutoSize = true;
this.rdoMale.Location = new System.Drawing.Point(7, 26);
this.rdoMale.Name = "rdoMale";
this.rdoMale.Size = new System.Drawing.Size(68, 24);
this.rdoMale.TabIndex = 0;
this.rdoMale.Text = "Male";
this.rdoMale.UseVisualStyleBackColor = true;
this.rdoMale.CheckedChanged += new System.EventHandler(this.rdpMale_CheckedChanged);
//
// rdoFemale
//
this.rdoFemale.AutoSize = true;
this.rdoFemale.Location = new System.Drawing.Point(7, 57);
this.rdoFemale.Name = "rdoFemale";
this.rdoFemale.Size = new System.Drawing.Size(87, 24);
this.rdoFemale.TabIndex = 1;
this.rdoFemale.Text = "Female";
this.rdoFemale.UseVisualStyleBackColor = true;
this.rdoFemale.CheckedChanged += new System.EventHandler(this.rdoFemale_CheckedChanged);
//
// rdoUnder20
//
this.rdoUnder20.AutoSize = true;
this.rdoUnder20.Location = new System.Drawing.Point(7, 26);
this.rdoUnder20.Name = "rdoUnder20";
this.rdoUnder20.Size = new System.Drawing.Size(100, 24);
this.rdoUnder20.TabIndex = 0;
this.rdoUnder20.TabStop = true;
this.rdoUnder20.Text = "Under 20";
this.rdoUnder20.UseVisualStyleBackColor = true;
this.rdoUnder20.CheckedChanged += new System.EventHandler(this.rdoUnder20_CheckedChanged);
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here