Comp 152 Project 1:
Review of Comp 151
Summary:
This lab will give you the chance to refresh all of your comp 151 skills.
Compiling:
You can use whatever you want to use to build your program. I will be
using Java 7, which is also installed on lab computers so if your program
works for Java 7, it works
Program Requirements:
Write a program that will
- open the file data.txt (get the file from the
website here).
- Read each line into your program.
- The lines go together in groups for four.
- The first line in the group is the language's current ranking. It
should be an integer
- The next line in the group is the language's ranking last year at
this time. It is also an integer
- The third line in the group is the programming language name. It is
a string.
- The forth line in the group is the programming language's mind share
percentage
- make an object to hold those four pieces of data
- put those objects into a collection (array or ArrayList)
- loop and ask the user which they want
to do (for those who did sorting in CS1)
- sort on this years ranking
- sort on last years ranking
- print the list
- quit
- or
- loop and ask the user which they want
to do (for those who did not do sorting in CS1)
- look up item based on this years ranking
- look up item based on last years ranking (handle out of range
gracefully.)
- print the list
- quit
- do this loop till the user selects quit.
When you are done:
You also need to have a readme.txt file in your folder which contains
- your name
- a brief (one paragraph) description of how you implemented the
project
- anything that is left undone in the project.
when you have completed the program and the readme, zip up the wholefolder
and submit it. Submit the
compressed folder as described below.
Submitting
Use moodle to submit the program online.