Design a java application that will read a file containing

Assignment Help JAVA Programming
Reference no: EM13842139

1 Final Project
This assignment demonstrates your understanding of the concepts from the CMIS 141 class. This homework consists of 1 programming assignment worth 25 points.

Before attempting this project, be sure you have completed all of the reading assignments, hands-on labs, discussions, and assignments to date.

1.  Design a Java application that will read a file containing data related to the passengers on the Titanic. The description of the file is shown below. The application should  provide statistical results on the passengers including:

a. Total number of passengers on the Titanic

b. Total number of passengers who perished on the Titanic

c. Total number of Passengers who survived the sinking of the Titanic

d. Number of passengers who survived the sinking of the Titanic as a function of the passenger class (e.g. 1,2,3)

e. Number of passengers who survived the sinking of the Titanic as a function of the passenger gender (e.g., male, female)

f. A list of the names of passengers who paid greater than $200 for their tickets

g. A list of the names of passengers who were less than 10 years old who survived the sinking of the Titanic

h. A list of the names of passengers who were less than 10 years old who perished on the Titanici.

The count of the number of passengers as a function of the first letter of their last name.  (e.g., A: 13, B:33 ...)

j. Additional statistical results you add to enhance the functionality

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 Titanic file.

b. Use a 2D array to store the Titanic data. (Hint: You will probably need to store the array as String values and then convert to other types as needed since some data is null)

c. You should create at least 2 Java classes - Titanic and TestTitanic. You are welcome to create additional classes if you want to further separate the functionality.

d. You should create separate methods for each of the required functionality. (e.g. getTotalPassengers() will return the total number of passengers on the Titanic.)

e. 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.

f. 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

g. 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

2 application should provide a prompt thanking the user for trying the Titanic program and providing the total time elapsed.
Here is sample run:

java TestTitanic Titanic.txt

Welcome to the Titanic Statistical Application

Enter the number of the question you want answered. Enter ‘Q' to quit the program :

1. How many passengers were on the Titanic?

2. What percentage of passengers perished on the Titanic?

3. What percentage passengers survived the sinking of the Titanic?

4. What percentage of passengers survived for each of the three classes?

5. What percentage of passengers survived as a function of gender?

6. What specific passengers paid more than $200 for their tickets?

7. What specific passengers who were less than 10 years old perished on the titanic?

8. What specific passengers who were less than 10 years old survived the sinking of the titanic?

9. For each letter in the alphabet, how many passengers last names started with that letter?

Q. Quit the program

Enter your selection: 1

There were 1310 Passengers on the Titanic.

Enter the number of the question you want answered. Enter ‘Q' to quit the program :

1. How many passengers were on the Titanic?

2. What percentage of passengers perished on the Titanic?

3. What percentage passengers survived the sinking of the Titanic?

4. What percentage of passengers survived for each of the three classes?

5. What percentage of passengers survived as a function of gender?

6. What specific passengers paid more than $200 for their tickets?

7. What specific passengers who were less than 10 years old perished on the titanic?

8. What specific passengers who were less than 10 years old survived the sinking of the titanic?

9. For each letter in the alphabet, how many passengers last names started with that letter?

Q. Quit the program

Enter your selection: 6

The following passengers paid more than $200 for their tickets:

Allen, Miss. Elisabeth Walton

Astor, Col. John Jacob

Astor, Mrs. John Jacob (Madeleine Talmadge Force)

Baxter, Mr. Quigg Edmond

Baxter, Mrs. James (Helene DeLaudeniere Chaput)

Bidois, Miss. Rosalie

Bird, Miss. Ellen

Bowen, Miss. Grace Scott

 

3 Cardeza, Mr. Thomas Drake Martinez

Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)

Chaudanson, Miss. Victorine

Douglas, Mrs. Frederick Charles (Mary Helene Baxter)

Endres, Miss. Caroline Louise

Farthing, Mr. John

Fortune, Miss. Alice Elizabeth

Fortune, Miss. Ethel Flora

Fortune, Miss. Mabel Helen

Fortune, Mr. Charles Alexander

Fortune, Mr. Mark

Fortune, Mrs. Mark (Mary McDougald)

Geiger, Miss. Amalie

Keeping, Mr. Edwin

Kreuchen, Miss. Emilie

Lesurer, Mr. Gustave J

Madill, Miss. Georgette Alexandra

Robbins, Mr. Victor

Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)

Ryerson, Master. John Borie

Ryerson, Miss. Emily Borie

Ryerson, Miss. Susan Parker "Suzette"

Ryerson, Mr. Arthur Larned

Ryerson, Mrs. Arthur Larned (Emily Maria Borie)

Straus, Mr. Isidor

Straus, Mrs. Isidor (Rosalie Ida Blun)

Ward, Miss. Anna

Widener, Mr. George Dunton

Widener, Mr. Harry Elkins

Widener, Mrs. George Dunton (Eleanor Elkins)

Enter the number of the question you want answered. Enter ‘Q' to quit the program :

1. How many passengers were on the Titanic?

2. What percentage of passengers perished on the Titanic?

3. What percentage passengers survived the sinking of the Titanic?

4. What percentage of passengers survived for each of the three classes?

5. What percentage of passengers survived as a function of gender?

6. What specific passengers paid more than $200 for their tickets?

7. What specific passengers who were less than 10 years old perished on the titanic?

8. What specific passengers who were less than 10 years old survived the sinking of the titanic?

9. For each letter in the alphabet, how many passengers last names started with that letter?

Q. Quit the program

Enter your selection: Q

Thank you for trying the Titanic Program.

Elapsed time in seconds was: 95

4 Extensive In-line comments providing additional insight into  code design and functionality 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: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 each 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 Final Project assignment area no later than the due date listed in the calendar.

Titanic Data Description:The attached tab delimited file, named titanic.txt contains the known passengers on the Titanic.

There are 6 fields included in the file in the order:Passenger class (1,2,3)Survived (1=yes, 0=no)Name (Passenger name)sex (male or female)age (some values are blank)fare (some values are blank)

Reference no: EM13842139

Questions Cloud

By including all stakeholders in the process redesign : By including all stakeholders in the process redesign; proper roles and responsibilities are defined.  While very often debated, the functional area that should have responsibility for a component of the process usually does despite how unpleasant th..
Write method that checks whether string is a valid password : Write a program that prompts the user to enter a password and displays Valid Password if the rules are followed or Invalid Password otherwise to verify a password according to as set of rules stated in the problem statement
Foundational element for sound decision making in business : Is Focusing on the process not individual functional area is a foundational element for sound decision making in business to increase the probability for positive business outcomes. discuss that ?
Measuring non financial performance : Research Six Sigma, Balanced Scorecard, and Triple Bottom Line. (A Google search with ethics AND the chosen model works well.) Which do you think would be most helpful in measuring nonfinancial performance? Why?
Design a java application that will read a file containing : Design a Java application that will read a file containing data
Create a database diagram of the final database : Write a script to establish a foreign key constraint between EMPLOYEES and DEPARTMENTS using the common field: DepartmentID. Create a database diagram of the final database clearly depicting all tables and relationships.
Create an eight-page book report : This assignment requires the student to read a book by one of the following personality psychologists (Freud, Erikson, Fromm, Jung, Rogers, or Skinner) and create an eight-page book report (about 2,000 words)
Describe the strategy of ford-using the strategy model : Describe the strategy of Ford, using the strategy model in Figure 1.4: Describing Dyson's strategy, on page 20 of Foundations in Strategy, as a guide to frame the strategy description from the following two perspectives:
Display all employees names last name first : Display all employees' names, last name first, and then first name, and hire date. Order the results by employee name, last name first, and then first name.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd