Ask Computer Engineering Expert

One of the many tasks that programmers get asked to do is to convert data from one form to another. Frequently data is presented to users in well-labelled, tabular form for easy reading. However, it is impossible or very difficult to do further processing of the data unless it is changed into a more useful form.

Your program will load this data into an array of structs, save the data in a form that is directly usable by a database (see below), display the data on the console in its original form and in its database form. It will also allow the user to display the highest number of applications for a given state and year.

Your program will use a menu to allow the user to choose what task is to be done. You will only be required to handle the Applications data. You can ignore the Offers and Offers rates data (see below).

Data

See "undergraduateapplicationsoffersandacceptances2013appendices.txt" for the original data.

This is the data your program should produce and save:

New South Wales    Charles Sturt University     4265 4298 4287 4668 4614

New South Wales    Macquarie University    6255 6880 7294 7632 7625

New South Wales    Southern Cross University 2432 2742 2573 2666 2442

New South Wales    The University of New England   1601 1531 1504 1632 1690

New South Wales    The University of New South Wales      10572    10865    11077    11008    11424   

New South Wales    The University of Newcastle  9364 9651 9876 10300    10571   

New South Wales    The University of Sydney  13963    14631    14271    14486    15058   

New South Wales    "University of Technology, Sydney"     10155    9906 9854 10621    9614

New South Wales    University of Western Sydney     11251    11776    11713    11947    13158   

New South Wales    University of Wollongong  3645 3685 3843 3801 3608

Victoria     Deakin University      10780    12301    11223    11443    11288   

Victoria     La Trobe University 7350 8377 8971 8987 9019

Victoria     Monash University    13346    15148    15119    14128    14786   

Victoria     RMIT University 12830    13232    13444    13556    12472   

Victoria     Swinburne University of Technology    3091 3314 3494 3288 3099

Victoria     The University of Melbourne 10035    8995 9242 10854    11315   

Victoria     University of Ballarat    1609 1718 1697 1531 1334

Victoria     Victoria University    5334 5427 4708 4789 4475

Queensland    Central Queensland University    2970 3114 3016 3808 3931

Queensland    Griffith University     10513    11828    12137    11342    11003   

Queensland    James Cook University 4852 5675 5371 5882 5899

Queensland    Queensland University of Technology 12062    13806    13446    13538    14255   

Queensland    The University of Queensland     12939    14169    14359    14469    14778   

Queensland    University of Southern Queensland 3754 4378 3730 3219 2508

Queensland    University of the Sunshine Coast     2238 2569 2466 2594 2656

Western Australia    Curtin University of Technology 5814 6993 7015 7013 7484

Western Australia    Edith Cowan University     3769 4343 3481 3407 3257

Western Australia    Murdoch University 2706 2837 2893 3102 2834

Western Australia    The University of Western Australia      6361 6661 7143 5782 5366

South Australia   Flinders University of South Australia  4558 5133 5442 5639 5823

South Australia   The University of Adelaide      7613 7348 7971 8510 8969

South Australia   University of South Australia 8960 9419 8950 9651 9504

Northern Territory   Charles Darwin University 2148 2335 2403 2625 2769

Tasmania University of Tasmania     9251 9692 10521    11722    12482   

Australian Capital Territory  The Australian National University 3541 3326 3329 3379 3263

Australian Capital Territory  University of Canberra 1917 1905 2166 2088 2050

Multi-State     Australian Catholic University     5893 6988 7181 8060 8974

Suggested Approach (Save a new version after each step)

I have put in brackets my assessment of the relative difficulty of each task. I found a hard task took more effort than a medium task which in turn took more effort than an 'easy' task.

1) (easy) Write a method to display instructions to the user

2) (easy) Write the code to display a menu and test it

3) (easy) Write the code to display the contents of the data file line by line

4) (easy) Write the code to save the contents of the data file to a new file

5) (medium) Write the code to copy the file data into a simple array of structs where the structure is something like:
struct data  string line;
and the array is
data[] myData = new data[100];

6) (easy) Write the code to deal with the unnecessary data at the start

7) (medium) Write the code to deal with the unnecessary data at the end

8) (hard) Write the code to modify the code to convert the original data into database format. You do not have to follow the exact structure given above, e.g. you could use commas instead of tabs

a. You may want to divide this into two problems. First treat the numbers as a string, i.e.
New South Wales, Charles Sturt University,"3,769"
and when you have that working then work out how to convert "3,769" into 3769 etc

9) (easy) Modify the struct to handle the modified data

10) (easy) Modify the file save code so that is saves the modified data

11) (medium) Write the code to find the highest number of applications in a year for a state

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9792526

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As