Homework 1
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
Write a Java program that prompts a user to enter student EMPLID (e.g., 12389), quiz 1 percentage
score (e.g., 89.5), quiz 2 percentage score (e.g., 81.2), quiz 3 percentage score (e.g., 92.5), your age in
months (e.g. 384) and the current temperature in degrees Celsius and then displays the data entered
along with some conversions and calculations.
A minimum of 3 test cases should be supplied in the form of table with columns indicating the input
values, expected output, actual output and if the test case passed or failed. This table should contain 4
columns with appropriate labels and a row for each test case. An example template is shown below.
Note that the actual output should be the actual results you receive when running your program and
applying the input for the test record.
The google recommended Java style guide, provided as link in the week 2 content, should be used to
format and document your code. Specifically, the following style guide attributes should be addressed:
Header comments include filename, author, date and brief purpose of the program.
In-line comments used to describe major functionality of the code.
Meaningful variable names and prompts applied.
Class names are written in UpperCamelCase.
Variable names are written in lowerCamelCase.
Constant names are in written in All Capitals.
Braces use K&R style.
You should capture and label screen captures associated with compiling your code, and running each of
your 3 test cases.
You should use the command prompt and not a GUI for data entry and display. Here is a sample run:
Enter your Student EMPLID (0 - 999999): 43023
Enter your quiz1 percentage score (0.0 – 100.0): 80.6
Enter your quiz2 percentage score (0.0 – 100.0): 82.6
Enter your quiz2 percentage score (0.0 – 100.0): 92.1
Enter your age in months (0-1440): 384
Enter the current Temperature in degrees Celsius: 19.0
*** Thank you ***
Student EMPLID: 43023
Quiz 1 Score: 80.6
Quiz 2 Score: 82.6
Quiz 3 Score: 92.1
Average quiz score: 80.0
Age in months: 384
Age in years: 32
1
Temperature in Celsius: 19.0
Temperature in Fahrenheit: 66.2
Note the following for the output for this application:
1. Degrees Celsius has been converted to degrees Fahrenheit on the output.
2. The temperature output provides the degrees symbol (°). (Hint: Use Unicode characters)
3. The average quiz score is calculated from the three quiz scores input.
Example test cases:
Input
EMPLID: 32012
Quiz1: 30.0
Quiz2: 20.5
Quiz3: 60.2
Age in months:
120
Temperature in
Celsius: 0.0
Expected Output
*** Thank you ***
Student EMPLID: 32012
Quiz 1 Score: 30.0
Quiz 2 Score: 20.5
Quiz 3 Score: 60.2
Average quiz score: 36.9
Age in months: 120
Age in years: 10
Temperature in Celsius: 0.0
Temperature in Fahrenheit: 32.0
Actual Output
*** Thank you ***
Student EMPLID: 32012
Quiz 1 Score: 30.0
Quiz 2 Score: 20.5
Quiz 3 Score: 60.2
Average quiz score:
Age in months: 120
Age in years: 10
Temperature in Celsius: 0.0
Temperature in Fahrenheit: 32.0
376
Pass?
Yes
Test case 2 here
Test case 3 here
Submission requirements
Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
named appropriately for your applications. The word (or PDF) document should include screen captures
showing the successful compiling and running of each of the test cases. Each screen capture should be
properly labeled clearly indicated what the screen capture represents. The test cases table should be
included in your word or PDF document and properly labeled as well.
Submit your files to the Homework 1 assignment area no later than the due date listed in your LEO
classroom. You should include your name and HW1 in your word (or PDF) file submitted (e.g.
firstnamelastnamehw1.docx or firstnamelastnamehw1.pdf)
2
Grading Rubric:
The following grading rubric will be used to determine your grade:
Attribute
User input
Application output
Meets
5 points
Does not meet
0 points
Application prompts a user to
enter student EMPLID, quiz 1
percentage score, quiz 2
percentage score, quiz 3
percentage score, age in
months and the current
temperature in degrees Celsius.
Application does not prompt a
user to enter student EMPLID,
quiz 1 percentage score, quiz 2
percentage score, quiz 3
percentage score, age in
months and the current
temperature in degrees Celsius.
Command Line was used for
input.
10 points
Command Line was not used for
input.
0 points
Application correctly displays all
data entered by the user along
with the calculated output for
average quiz, age in years and
temperature in Fahrenheit.
Application does not correctly
displays all data entered by the
user along with the calculated
output for average quiz, age in
years and temperature in
Fahrenheit.
Command Line was used for
output.
Test Cases
5 points
A minimum of 3 test cases was
used in the form of table with
columns indicating the input
values, expected output, actual
output and if the test case
passed or failed. The table
should contains 4 columns with
appropriate labels and a row for
each test case.
Documentation and Style guide
Test cases were included in the
supporting word or PDF
documentation.
5 points
Screen captures were provided
and labeled for compiling your
Command Line was not used for
output.
0 points
No test cases were provided.
0 points
No documentation included
3
code, and running each of your
3 test cases.
Java style guide was not used to
prepare the Java code.
Header comments include
filename, author, date and brief
purpose of the program.
In-line comments used to
describe major functionality of
the code.
Meaningful variable names and
prompts applied.
Class names are written in
UpperCamelCase.
Variable names are written in
lowerCamelCase.
Constant names are in written
in All Capitals.
Braces use K&R style.
4
Homework 2
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
Design a Java class named Polygon that contains:
A private int data field named numSides that defines the number of sides of the
polygon. The default value should be 4.
A private double data field named sideLength that defines the length of each side. The
default value should be 5.0.
A private double data field named xCoord that defines the x-coordinate of the center of
the polygon. The default value should be 0.0.
A private double data field named yCoord that defines the y-coordinate of the center of
the polygon. The default value should be 0.0.
A private double data filed named perimeter that defines the perimeter of the polygon.
A no argument constructor that creates a Polygon using the default number of sides,
default side length, and default x- and y-coordinates.
A constructor that creates a Polygon using a specified number of sides, side length, and
x- and y-coordinates
Getter methods for all data fields
A getPerimeter() method that returns a double value representing the perimeter of the
Polygon.
A toString() method that displays the number of sides, side length, x-coordinate, and ycoordinates in String format
Be sure your code compiles.
Write a Java test program, named TestPolygon, to create 5 different polygons representing the 5 test
cases you just created. When creating the five polygons, create one using the no argument constructor.
For the remaining four, feel free to use any number of sides, side length and x-, and y-coordinates that
are not equal to the default values and not equal to each other. For each of the five polygons, call all of
the methods and display the results. For example for a Polygon with 3 sides, side length of 2.0 and xcoordinate and y-coordinates of 1.0, the following test data may result:
***Output***
toString(): (numsides=3, sideLength=2.0, xcoord=1.0,ycoord=1.0)
getNumSides(): 3
getSideLength(): 2.0
getXCoord(): 1.0
getYCoord(): 1.0
getPerimeter(): 6.0
Document your test cases in the form of table with columns indicating the input values, expected
output, actual output and if the test case passed or failed. This table should contain 4 columns with
appropriate labels and a row for each test case. An example template is shown below. Note that the
1
actual output should be the actual results you receive when running your program and applying the
input for the test record.
Keep in mind, for five Polygons, you will have five different output results. Also, note there is no
requirement to actually draw a Polygon.
Example test cases:
Input
Constructor:
numsides=3
sideLength=2.0
xcoord=1.0
ycoord=1.0
Expected Output
** Output **
Actual Output
** Output **
toString(): (numsides=3,
sideLength=2.0,
xcoord=1.0,ycoord=1.0)
getNumSides(): 3
getSideLength(): 2.0
getXCoord(): 1.0
getYCoord(): 1.0
getPerimeter(): 6.0
toString(): (numsides=3,
sideLength=2.0,
xcoord=1.0,ycoord=1.0)
getNumSides(): 3
getSideLength(): 2.0
getXCoord(): 1.0
getYCoord(): 1.0
getPerimeter(): 6.0
Pass?
Yes
Test case 2 here
Test case 3 here
Test case 4 here
Test case 5 here
The google recommended Java style guide, provided as link in the week 2 content, should be used to
format and document your code. Specifically, the following style guide attributes should be addressed:
Header comments include filename, author, date and brief purpose of the program.
In-line comments used to describe major functionality of the code.
Meaningful variable names and prompts applied.
Class names are written in UpperCamelCase.
Variable names are written in lowerCamelCase.
Constant names are in written in All Capitals.
Braces use K&R style.
Submission requirements
Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
named appropriately for your applications. The word (or PDF) document should include screen captures
showing the successful compiling and running of each of the test cases. Each screen capture should be
properly labeled clearly indicated what the screen capture represents. The test cases table should be
included in your word or PDF document and properly labeled as well.
2
Submit your files to the Homework 2 assignment area no later than the due date listed in your LEO
classroom. You should include your name and HW2 in your word (or PDF) file submitted (e.g.
firstnamelastnamehw2.docx or firstnamelastnamehw2.pdf)
Grading Rubric:
In all programming assignments the following grading rubric will be used to determine your grade:
Attribute
Design (5 points)
Functionality (10
points)
Test cases (5 points)
Exceeds
(5 points)
Meets
(3-4 points)
Does not meet
(0-2 points)
Exhibits proper use of
parameters, and
selection of data types
all of the time.
Exhibits proper use of
parameters, and
selection of data types
most of the time.
Rarely exhibits proper
use of parameters, and
selection of data types.
Employs correct and
appropriate use of
programming
structures (loops,
conditionals, classes
etc.) all of the time.
Employs correct and
appropriate use of
programming
structures (loops,
conditionals, classes
etc.) most of the time.
Efficient algorithms
used all of the time.
(9-10 points)
Efficient algorithms
used most of the time.
(7-8 points)
Extra effort was
apparent through the
addition of significant
and additional
functionality beyond
the scope of the
assignment.
Program fulfills most
functionality.
Program does not fulfill
functionality.
Most requirements
were fulfilled.
Few requirements
were fulfilled.
Screen captures
provided
demonstrating the
successful compiling
and running of the
program.
(3-4 points)
(0-2 points)
(5 points)
Test cases provide
comprehensive
Test cases provide
coverage of most code
paths.
Rarely employs correct
and appropriate use of
programming
structures (loops,
conditionals, classes
etc.)
Poorly structured and
inefficient algorithms.
(0-6 points)
No or insufficient test
cases
3
coverage of all code
paths.
Java Style Guide (5
points)
Discussion of run-time
errors included.
(5 points)
Code impeccably neat
and well-organized.
Extensive In-line
comments providing
additional insight into
code design and
functionality
Test cases results well
documented providing
pass/fail results for
each test case.
Minimal supporting
evidence provided to
verify testing actually
took place.
(3-4 points)
(0-2 points)
Header comments
include filename,
author, date and brief
purpose of the
program.
Code rarely follows
recommended Java
style guide
In-line comments used
to describe major
functionality of the
code.
Meaningful variable
names and prompts
applied.
Class names are
written in
UpperCamelCase.
Variable names are
written in
lowerCamelCase.
Constant names are in
written in All Capitals.
Braces use K&R style.
Submission requirements
Your deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should
be named appropriately for your applications. Your word document should include screen shots
showing the successful compiling and running of each application, and a detailed description of the test
plan for your application. The test plan should include the input, expected output, actual output and if
the test case passed or failed. Submit your files to the Homework 2 assignment area no later than the
due date listed in the calendar. You should include your name and HW2 in your word (or PDF) file
submitted (e.g. firstnamelastnamehw2.docx or firstnamelastnamehw2.pdf)
4
Homework 3
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
Create a Java class named HeadPhone to represent a headphone set. The class contains:
Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the
headphone volume.
A private int data field named volume that specifies the volume of the headphone. The
default volume is MEDIUM.
A private boolean data field named pluggedIn that specifies if the headphone is plugged
in. The default value is false.
A private String data field named manufacturer that specifies the name of the
manufacturer of the headphones.
A private Color data field named headPhoneColor that specifies the color of the
headphones.
A private String data field named headPhoneModel that specifies the Model of the
headphones.
getter and setter methods for all data fields.
A no argument constructor that creates a default headphone.
A method named toString() that returns a string describing the current field values of
the headphones.
A method named changeVolume(value) that changes the volume of the headphone to
the value passed into the method
Create a TestHeadPhone class that constructs at least 3 HeadPhone objects. For each of the objects
constructed, demonstrate the use of each of the methods. Be sure to use your IDE to accomplish this
assignment.
The google recommended Java style guide, provided as link in the week 2 content, should be used to
format and document your code. Specifically, the following style guide attributes should be addressed:
Header comments include filename, author, date and brief purpose of the program.
In-line comments used to describe major functionality of the code.
Meaningful variable names and prompts applied.
Class names are written in UpperCamelCase.
Variable names are written in lowerCamelCase.
Constant names are in written in All Capitals.
Braces use K&R style.
Submission requirements
Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
named appropriately for your applications. The word (or PDF) document should include screen captures
showing the successful compiling and running of each of the test cases. Each screen capture should be
properly labeled clearly indicated what the screen capture represents. The test cases table should be
included in your word or PDF document and properly labeled as well.
Submit your files to the Homework 3 assignment area no later than the due date listed in your LEO
classroom. You should include your name and HW3 in your word (or PDF) file submitted (e.g.
firstnamelastnamehw3.docx or firstnamelastnamehw3.pdf)
Grading Rubric:
The following grading rubric will be used to determine your grade:
Attribute
Headphone Class
Meets
10 points
Does not meet
0 points
Three constants named LOW,
MEDIUM and HIGH with values
of 1, 2 and 3 to denote the
headphone volume
Three constants named LOW,
MEDIUM and HIGH with values
of 1, 2 and 3 were not included.
A private int data field named
volume that specifies the
volume of the headphone. The
default volume is MEDIUM.
A private boolean data field
named pluggedIn that specifies
if the headphone is plugged in.
The default value is false.
A private String data field
named manufacturer that
specifies the name of the
manufacturer of the
headphones.
A private int data field named
volume was not included.
A private boolean data field
named pluggedIn was not
included.
A private String data field
named manufacturer was not
included
A private Color data field named
headPhoneColor was not
included.
A private String data field
named headPhoneModel was
A private Color data field named not included
headPhoneColor that specifies
the color of the headphones.
getter and setter methods for
all data fields were not
A private String data field
included.
named headPhoneModel that
specifies the Model of the
A no argument constructor was
headphones.
not included.
getter and setter methods for
all data fields.
A method named toString()was
not included.
A no argument constructor that
creates a default headphone.
A method named
changeVolume(value) was not
included.
A method named toString() that
returns a string describing the
current field values of the
headphones.
An IDE (Netbeans or Eclipse)
was not used for this
assignment.
A method named
changeVolume(value) that
changes the volume of the
headphone to the value passed
into the method
Test Headphone Class
An IDE (Netbeans or Eclipse)
was used for this assignment.
5 points
0 points
TestHeadPhone class was used
to construct at least 3
HeadPhone objects.
TestHeadPhone class was not
used to construct at least 3
HeadPhone objects.
For each of the objects
constructed, the use of each of
the methods was demonstrated
For each of the objects
constructed, the use of each of
the methods was not
demonstrated
An IDE (Netbeans or Eclipse)
was used for this assignment.
Test Cases
5 points
A minimum of 3 test cases was
used in the form of table with
columns indicating the input
values, expected output, actual
output and if the test case
passed or failed. The table
should contains 4 columns with
appropriate labels and a row for
each test case.
An IDE (Netbeans or Eclipse)
was not used for this
assignment.
0 points
No test cases were provided.
Documentation and Style guide
Test cases were included in the
supporting word or PDF
documentation.
5 points
Screen captures were provided
and labeled for compiling your
code, and running each of your
3 test cases.
Header comments include
filename, author, date and brief
purpose of the program.
In-line comments used to
describe major functionality of
the code.
Meaningful variable names and
prompts applied.
Class names are written in
UpperCamelCase.
Variable names are written in
lowerCamelCase.
Constant names are in written
in All Capitals.
Braces use K&R style.
0 points
No documentation included
Java style guide was not used to
prepare the Java code.
Homework 4
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
Write a Java program the displays the State bird and flower. You should use your IDE for this exercise.
You should also use Java classes to their full extent to include multiple methods and at least two classes.
The program should prompt the user to enter a State and print both the State bird and flower. The user
should be able to enter a State without worrying about case. (e.g. Users could enter Maryland,
maryland, MARYLAND or any other possible combination of lower and upper case characters. States
may also contain leading and trailing white spaces. Hint: Store the State information in a multidimensional array. The program should continue to prompt the user to enter a state until “None” is
entered. After all States have been entered by the user, the program should display a summary of the
results. You will need to do some research to find the State birds and flowers. Here is a sample run:
Enter a State or None to exit:
Maryland
Bird: Baltimore Oriole
Flower: Black-eyed Susan
Enter a State or None to exit:
Delaware
Bird: Blue Hen Chicken
Flower: Peach Blossom
Enter a State or None to exit:
None
**** Thank you *****
A summary report for each State, Bird, and Flower is:
Maryland, Baltimore Oriole, Black-eyed Susan
Delaware, Blue Hen Chicken, Peach Blossom
Please visit our site again!
Create a test class that constructs at least 3 States objects. For each of the objects constructed,
demonstrate the use of each of the methods. Be sure to use your IDE to accomplish this assignment.
The google recommended Java style guide, provided as link in the week 2 content, should be used to
format and document your code. Specifically, the following style guide attributes should be addressed:
Header comments include filename, author, date and brief purpose of the program.
In-line comments used to describe major functionality of the code.
Meaningful variable names and prompts applied.
Class names are written in UpperCamelCase.
Variable names are written in lowerCamelCase.
Constant names are in written in All Capitals.
Braces use K&R style.
Submission requirements
Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
named appropriately for your applications. The word (or PDF) document should include screen captures
showing the successful compiling and running of each of the test cases. Each screen capture should be
properly labeled clearly indicated what the screen capture represents. The test cases table should be
included in your word or PDF document and properly labeled as well.
Submit your files to the Homework 4 assignment area no later than the due date listed in your LEO
classroom. You should include your name and HW4 in your word (or PDF) file submitted (e.g.
firstnamelastnamehw4.docx or firstnamelastnamehw4.pdf)
Grading Rubric:
The following grading rubric will be used to determine your grade:
Attribute
StatesDataEntry Class
Meets
10 points
Does not meet
0 points
The program prompts the user
to enter a State and prints both
the State bird and flower.
The program does not prompt
the user to enter a State and
prints both the State bird and
flower.
State data entry is case
insensitive.
States data may also contain
leading and trailing white
spaces.
The program continues to
prompt the user to enter a state
until “None” is entered.
After all data has been entered
by the user, the program
displays a summary report of all
state requests.
An IDE (Netbeans or Eclipse)
was used for this assignment.
Test StatesDataEntry Class
5 points
State data entry for case
insensitive input are not
handled properly.
States data containing leading
and trailing white spaces are
not handled properly.
The program does not continue
to prompt the user to enter a
state until “None” is entered.
After all data has been entered
by the user, the program does
not display a summary report of
all state requests.
An IDE (Netbeans or Eclipse)
was not used for this
assignment.
0 points
Test class was used to construct
at least 3 States objects.
For each of the objects
constructed, the use of each of
the methods was demonstrated
An IDE (Netbeans or Eclipse)
was used for this assignment.
Test Cases
5 points
A minimum of 3 test cases was
used in the form of table with
columns indicating the input
values, expected output, actual
output and if the test case
passed or failed. The table
should contains 4 columns with
appropriate labels and a row for
each test case.
Documentation and Style guide
Test cases were included in the
supporting word or PDF
documentation.
5 points
Screen captures were provided
and labeled for compiling your
code, and running each of your
5 test cases.
Header comments include
filename, author, date and brief
purpose of the program.
In-line comments used to
describe major functionality of
the code.
Meaningful variable names and
prompts applied.
Test class was not used to
construct at least 3 States
objects.
For each of the objects
constructed, the use of each of
the methods was not
demonstrated
An IDE (Netbeans or Eclipse)
was not used for this
assignment.
0 points
No test cases were provided.
0 points
No documentation included
Java style guide was not used to
prepare the Java code.
Class names are written in
UpperCamelCase.
Variable names are written in
lowerCamelCase.
Constant names are in written
in All Capitals.
Braces use K&R style.
Final Project
This assignment demonstrates your understanding of the concepts from the CMIS 141 class.
Before attempting this project, be sure you have completed all of the reading assignments, hands-on
labs, discussions, and assignments to date.
Design a Java application that will read a file containing data related to the US. Crime statistics from
1994-2013. The description of the file is at the end of this file. The application should provide statistical
results on the data including:
a. Population growth in percentages from each consecutive year (e.g. 1994-1995
calculation is ((262803276 - 260327021)/260327021)*100 = 0.9512%, 1995-1996 would
be ((265228572 - 262803276)/262803276)*100 = 0.9229%)
b. Years where the maximum and minimum Murder rates occurred.
c. Years where the maximum and minimum Robbery rates occurred.
The following are some design criteria and specific requirements that need to be addressed:
a. Use command line arguments to send in the name of the US Crime Data file.
b. You should also use Java classes to their full extent to include multiple methods and at
least two classes
c. You are not allowed to modify the Crime.csv Statistic data file included in this
assignment.
d. Use arrays and Java classes to store the data. (Hint: You can and should create a
USCrimeClass to store the fields. You can also have an Array of US Crime Objects.)
e. You should create separate methods for each of the required functionality. (e.g.
getMaxMurderYear() will return the Year where the Murder rate was highest. )
f. A user-friendly and well-organized menu should be used for users to select which data
to return. A sample menu is shown in run example. You are free to enhance your design
and you should add additional menu items and functionality.
g. The menu system should be displayed at the command prompt, and continue to
redisplay after results are returned or until Q is selected. If a user enters an invalid menu
item, the system should redisplay the menu with a prompt asking them to enter a valid
menu selection
h. The application should keep track of the elapsed time (in seconds) between once the
application starts and when the user quits the program. After the program is exited, the
application should provide a prompt thanking the user for trying the US Crime Statistics
program and providing the total time elapsed.
i. Hint: When reading the Crimes file, read one line at a time (See ReadEmail.java) and
then within the loop parse each line into the USCrimeClass fields and then store that
USCrimeClass Object into an array. Note you can use String.split(“,”) to split the CSV line
into a the fields for setting the USCrimeClass Object.
Here is sample run:
java TestUSCrime Crime.csv
1
********** Welcome to the US Crime Statistical Application **************************
Enter the number of the question you want answered. Enter ‘Q’ to quit the program :
1.
2.
3.
4.
5.
Q.
What were the percentages in population growth for each consecutive year from 1994 – 2013?
What year was the Murder rate the highest?
What year was the Murder rate the lowest?
What year was the Robbery rate the highest?
What year was the Robbery rate the lowest?
Quit the program
Enter your selection: 2
The Murder rate was highest in 1994
Enter the number of the question you want answered. Enter ‘Q’ to quit the program :
1.
2.
3.
4.
5.
Q.
What were the percentages in population growth for each consecutive year from 1994 – 2013?
What year was the Murder rate the highest?
What year was the Murder rate the lowest?
What year was the Robbery rate the highest?
What year was the Robbery rate the lowest?
Quit the program
Enter your selection: 5
The Robbery rate was lowest in 2013
Enter the number of the question you want answered. Enter ‘Q’ to quit the program :
1.
2.
3.
4.
5.
Q.
What were the percentages in population growth for each consecutive year from 1994 – 2013?
What year was the Murder rate the highest?
What year was the Murder rate the lowest?
What year was the Robbery rate the highest?
What year was the Robbery rate the lowest?
Quit the program
Enter your selection: Q
Thank you for trying the US Crimes Statistics Program.
Elapsed time in seconds was: 32
The google recommended Java style guide, provided as link in the week 2 content, should be used to
format and document your code. Specifically, the following style guide attributes should be addressed:
Header comments include filename, author, date and brief purpose of the program.
In-line comments used to describe major functionality of the code.
Meaningful variable names and prompts applied.
2
Class names are written in UpperCamelCase.
Variable names are written in lowerCamelCase.
Constant names are in written in All Capitals.
Braces use K&R style.
Submission requirements
Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
named appropriately for your applications. The word (or PDF) document should include screen captures
showing the successful compiling and running of each of the test cases. Each screen capture should be
properly labeled clearly indicated what the screen capture represents. The test cases table should be
included in your word or PDF document and properly labeled as well.
Submit your files to the Final Project area no later than the due date listed in your LEO classroom. You
should include your name and FP in your word (or PDF) file submitted (e.g. firstnamelastnameFP.docx or
firstnamelastnameFP.pdf)
Grading Rubric:
The following grading rubric will be used to determine your grade:
Attribute
Crimes Class
Meets
15 points
Population growth in
percentages is calculated from
each consecutive year
Does not meet
0 points
Population growth in
percentages is not calculated
from each consecutive year
Years where the maximum and
minimum Murder rates
occurred are calculated.
Years where the maximum and
minimum Murder rates
occurred are not calculated.
Years where the maximum and
minimum Robbery rates
occurred are calculated.
Years where the maximum and
minimum Robbery rates
occurred are not calculated.
Command line arguments to
send in the name of the US
Crime Data file were used.
Command line arguments to
send in the name of the US
Crime Data file are not used.
Java classes to their full extent
to include multiple methods
and at least two classes were
used.
Java classes to their full extent
to include multiple methods
and at least two classes are not
used.
3
Crime.csv Statistic data file was
not modified.
Crime.csv Statistic data file was
modified.
Use arrays and Java classes
were used to store the data.
Use arrays and Java classes are
not used to store the data.
Creates separate methods for
each of the required
functionality.
Does not create separate
methods for each of the
required functionality.
A user-friendly and wellorganized menu was used.
A user-friendly and wellorganized menu was not used.
The menu system is displayed at
the command prompt.
The menu system is not
displayed at the command
prompt.
The menu system continues to
redisplay after results are
returned or until Q is selected.
If a user enters an invalid menu
item, the system redisplays the
menu with a prompt asking
them to enter a valid menu
selection.
The application keeps track of
the elapsed time (in seconds)
between the application start
and when the user quits the
program.
After the program is exited, the
application provides a prompt
thanking the user for trying the
US Crime Statistics program and
providing the total time elapsed
in seconds.
Test Cases
5 points
A minimum of 3 test cases was
used in the form of table with
columns indicating the input
values, expected output, actual
output and if the test case
passed or failed. The table
The menu system does not
continue to redisplay after
results are returned or until Q is
selected.
If a user enters an invalid menu
item, the system does not
redisplay the menu with a
prompt asking them to enter a
valid menu selection.
The application does not keep
track of the elapsed time (in
seconds) between the
application start and when the
user quits the program.
After the program is exited, the
application does not provides a
prompt thanking the user for
trying the US Crime Statistics
program and providing the total
time elapsed in seconds.
0 points
No test cases were provided.
4
should contains 4 columns with
appropriate labels and a row for
each test case.
Documentation and Style guide
Test cases were included in the
supporting word or PDF
documentation.
5 points
Screen captures were provided
and labeled for compiling your
code, and running each of your
3 test cases.
0 points
No documentation included
Java style guide was not used to
prepare the Java code.
Header comments include
filename, author, date and brief
purpose of the program.
In-line comments used to
describe major functionality of
the code.
Meaningful variable names and
prompts applied.
Class names are written in
UpperCamelCase.
Variable names are written in
lowerCamelCase.
Constant names are in written
in All Capitals.
Braces use K&R style.
US Crimes Data Description:
The attached Comma delimited file, named Crime.csv contains US Crime data from 1994 – 2013. The
first line in the file contains the field names. (Note: Do not modify this file in anyway. You should use it
as is for input for your application)
The US Crime data were obtained from this Web Site:
https://www.fbi.gov/about-us/cjis/ucr/crime-in-the-u.s/2013/crime-in-the-u.s.2013/tables/1tabledatadecoverviewpdf/table_1_crime_in_the_united_states_by_volume_and_rate_pe
r_100000_inhabitants_1994-2013.xls#overview
5
Purchase answer to see full
attachment