Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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)

Java, Programming

  • Category:- Java
  • Reference No.:- M91411947
  • Price:- $45

Priced at Now at $45, Verified Solution

Have any Question?


Related Questions in Java

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

  • 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