Question

In: Computer Science

Your software development company wants to continue developing and enhancing a software application for internal use....

  1. Your software development company wants to continue developing and enhancing a software application for internal use.

    For this week's assignment, the application is required to read from a file (data.txt) containing employee data. Your tasks include:

    • Use the data file from Week One (data.txt)
    • Implement LINQ functionalities to search, display, and modify employees' records
    • Meet specifications by displaying on a Windows Form Application

    Program Input File:

    Using Visual Studio and C# programming concepts and using your Week one data.txt file as your source file, write a program to meet the specifications of the company's request. The program should have the following characteristics:

    • Compile and execute without errors
    • Meet specifications by demonstrating LINQ queries, data structure manipulation, and Windows Form output mastery by accomplishing the following:
    • Query employees' data
    • Input the data into a data structure
    • Display the employees' data on the console
    • Logic flow is clear, concise, and effective
    • User inputs and outputs should be clear on screen
    • Validation for input types and data format
    • Appropriate indentation to logically illustrate program structure
    • Identifiers logically describe use
    • Naming conventions are consistent
    • Comments and headers to explain processing that is not obvious
    • Name,            Address,             Age, Gross,    Department, Dev Type, Tax Type
      Bill Gates,      111 Main Street,     29, 22000.00, 11,        Script,   W2
      Steve Jobs,      222 Oak Street,      31, 33000.00, 21,        OOP,      1099
      Elon Musk,       333 South Street,    27, 44000.00, 41,        Script,   W2
      Grace Hopper,    444 Elm Street,      30, 55000.00, 71,        OOP,      W2
      Dennis Ritchie, 555 10th Avenue,     37, 66000.00, 21,        Script,   1099

Solutions

Expert Solution

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;
using System.IO;
namespace WindowsFormsApp1
{
public partial class frnChegProj1 : Form
{
public frnChegProj1()
{
InitializeComponent();
}
OpenFileDialog openFileDialog = new OpenFileDialog();
DataTable dt = new DataTable(); //As the datasource for Grid
int DrCurRow = 0;
bool header = true; //first time true

private void btnOpenFile_Click(object sender, EventArgs e)
{
try
{
if (openFileDialog.ShowDialog() == DialogResult.OK)//Do some thing only OK
{
if (openFileDialog.FileName.Contains("Data.txt"))//Do only file name is the defined datafile
{
AssignDatatoGrid(openFileDialog.FileName);

}

}


}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
private void AssignDatatoGrid(string fileName)
{
using (TextReader txtreader = File.OpenText(fileName))
{
try
{
string linetxt;
while ((linetxt = txtreader.ReadLine()) != null)
{
string[] dataitems = linetxt.Trim().Split(',');
if (dataitems.Length > 6)
{
AddtoDtatatable(dataitems);
header = false;
}

}
}
catch(Exception ex)
{
throw ex;
}
}
  
dgvTxtSrc.DataSource = dt;

}

private void AddtoDtatatable(string[] CurRow)
{
try
{

if (header)
{
//add datatable header since predefined header creating inadvance
dt.Columns.Add(new DataColumn("Name", typeof(string)));
dt.Columns.Add(new DataColumn("Address", typeof(string)));
dt.Columns.Add(new DataColumn("Age", typeof(Int16)));
dt.Columns.Add(new DataColumn("Gross", typeof(double)));
dt.Columns.Add(new DataColumn("Department", typeof(Int16)));
dt.Columns.Add(new DataColumn("DevType", typeof(string)));
dt.Columns.Add(new DataColumn("TaxType", typeof(string)));

//add datatable rows
}
else
{
//add datatable rows
dt.Rows.Add();
for (int i = 0; i < CurRow.Length; i++)
{
dt.Rows[DrCurRow][i] = CurRow[i];


}
DrCurRow = DrCurRow + 1; //assgining /increasing row
}
}
catch(Exception ex)
{
throw ex;
}
}
}


}


Related Solutions

Explain why it is essential to follow the software development process when developing a software system...
Explain why it is essential to follow the software development process when developing a software system   
The software application development company for which you work is evaluating two different options for starting...
The software application development company for which you work is evaluating two different options for starting a new application development within the upcoming year. The company seeks to earn a return on each project that exceeds its cost of capital of 6.5 %. Further, the company assumes that given the current economic conditions, inflation may be expected to grow by 1% for the next year. Assume that the project takes place in Year 0 and begins earning cash flows on...
The software application development company for which you work is evaluating two different options for starting...
The software application development company for which you work is evaluating two different options for starting a new application development within the upcoming year. The company seeks to earn a return on each project that exceeds its cost of capital of 6.5 %. Further, the company assumes that given the current economic conditions, inflation may be expected to grow by 1% for the next year. Assume that the project takes place in Year 0 and begins earning cash flows on...
You are the project manager of a software development company. Your company receives supplies of chips...
You are the project manager of a software development company. Your company receives supplies of chips from a foreign supplier. Their sales manager has approached you to inform you that if you can increase your order by 30%, the shipment will be free for your organization. This however will bring additional cost of $100 on your current budget that is $5000 p.a. What type of Risk is this? Identify at least three things you can do in response given consideration...
Identify a non-traditional software development model that could be used by your company.
Identify a non-traditional software development model that could be used by your company.Provide a summary of the major steps in the development model, and describe the potential security threats for each step.Using the security development model as the foundation for analysis, develop and document appropriate policies and processes for each security risk that will minimize the threat.Association with the security development model should be demonstrated in the policies and processes.
Exercise 10-31 Software development costs [LO10-8] Early in 2018, the Excalibur Company began developing a new...
Exercise 10-31 Software development costs [LO10-8] Early in 2018, the Excalibur Company began developing a new software package to be marketed. The project was completed in December 2018 at a cost of $11,000,000. Of this amount, $9,000,000 was spent before technological feasibility was established. Excalibur expects a useful life of five years for the new product with total revenues of $15,000,000. During 2019, revenue of $6,000,000 was recognized. Required: 1. Prepare a journal entry to record the 2018 development costs....
3.You are the project manager of a software development company. Your company receives supplies of chips...
3.You are the project manager of a software development company. Your company receives supplies of chips from a foreign supplier. Their sales manager has approached you to inform you that if you can increase your order by 30%, the shipment will be free for your organization. This however will bring additional cost of $100 on your current budget that is $5000 p.a. What type of Risk is this? Identify at least three things you can do in response given consideration...
Use computer software packages, such as Excel, to solve this problem. The Jacobs Chemical Company wants...
Use computer software packages, such as Excel, to solve this problem. The Jacobs Chemical Company wants to estimate the mean time (minutes) required to mix a batch of material on machines produced by three different manufacturers. To limit the cost of testing, four batches of material were mixed on machines produced by each of the three manufacturers. The times needed to mix the material follow. Manufacturer 1 Manufacturer 2 Manufacturer 3 17 29 17 23 27 16 21 32 20...
Computer Dynamics (p. 175 of your textbook) is a microcomputer software development company that has a...
Computer Dynamics (p. 175 of your textbook) is a microcomputer software development company that has a 300-computer network. The company is located in three adjacent five-story buildings in an office park, with about 100 computers in each building. The LANs in each building are similar, but one building has the data center on the second floor. There are no other office locations. The current network is poorly designed for its current needs and must be completely replaced. 1. Develop a...
You are a software development employee at a startup company. Your HR department has tasked the...
You are a software development employee at a startup company. Your HR department has tasked the IT department with developing a simple application (Windows Form Application) to load and display employee records. Your application will need to do the following: Create an Employee Class with the following properties: First Name Last Name Street Address City State Zip Create a sub class for Managers which inherits from the Employee Class. The Manager class will have the following additional properties: Cost Center...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT