Uncategorized

You have just graduated from college, and are looking to buy your first car. Money is tight right now, so you are concerned with initial cost as well as ongoing expenses. At the same time, you donÂ’t want to drive a slow, ugly car like your parents. You have narrowed your choices down to two vehicles: a Honda Enigma or Porsche Booster. Based on the numbers below, calculate the value index for each car

A+ Work, chart attached with work.

You have just
graduated from college, and are looking to buy your first car.  Money is tight right now, so you are
concerned with initial cost as well as ongoing expenses. At the same time, you
donÂ’t want to drive a slow, ugly car like your parents.  You have narrowed your choices down to two
vehicles: a Honda Enigma or Porsche Booster.
Based on the numbers below, calculate the value index for each car.  Which car provides you with the greatest
value?

Suppose a text file “degrees.txt” contains the number of bachelor degrees conferred in 1981 and 2011 in certain fields of study. The file looks like the following:

Business,200521,311574

Computer and info. Science,15121,54111

Education,108074,105451

Engineering,63642,64906

Social sciences and history,100513,156892

Write a program that provides the user with the following options. Your code should work for ANY text file as long as it follows the same format:

field name1,number of degrees in 1981,number of degrees in 2011

field name2,number of degrees in 1981,number of degrees in 2011

field name3,number of degrees in 1981,number of degrees in 2011

field name4,number of degrees in 1981,number of degrees in 2011

field name5,number of degrees in 1981,number of degrees in 2011

field name6,number of degrees in 1981,number of degrees in 2011

Â…

The number of fields in the text file is unknown.

a) Declare a class-level String array named strDegrees (refer to end of chapter 3 for class-level variable declaration). Then when the form is loaded, read the entire content from the text file into strDegrees. (5 points)

b) When “Table of Degrees” is clicked, display the content of the text file in a formatted table (Hint: in a loop that traverse the array strDegrees, first use Split to separate the degree, number of degrees in 1981, and number of degrees in 2011, then display them in the list box). (15 points)

b) When “Percentage Changes” button is clicked, display the percentage change for all fields in a formatted table (Hint: in a loop that traverse the array strDegrees, first use Split to parse the three pieces of information – the degree, number of degrees in 1981, and number of degrees in 2011 – then calculate the percentage changes, then display them in the list box). (15 points)

c) When the user enters a field of study in the text box and click the “Search” button, if the field is found, display field of study, the number of degrees in 1981 and 2011 in a text box. If the field is not found, display a message saying that field is not found. (Hint: you may use an If statement in the loop or use LINQ to perform the search) (15 points)

d) Quit the program (Quit button) (5 point)