Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ and Java program that will allow for creation and viewing of players from the football team we create. The directions are like

Write a C++ and Java program that will allow for creation and viewing of players from the football team we create. The directions are like this below;

We are going to be creating Players for our football team.

We will need to create and store these Players in memory and allow the user to view an entire roster of Players. We will make the following assumptions:

No two Players will have the same name .

No two Players can have the same number.

Each Player MUST have at-least a first name, last name, and jersey number.

In the basic submission there will only be, at maximum, eleven (11) Players on our team.

Goal is to create a program that will allow for creation and viewing of Players from our team.

Required to implement the following items as part of this assignment:

C++ program must contain three files (2 .cpp and 1 .h file). These files should be named as such: Driver.cpp, Player.cpp, Player.h.

Java program must contain the following two files: Driver.java and Player.java.

Driver class must store any and all created Players in an Array on the Heap.

This Array must make use of dynamic memory allocation.

In the C++ version we will need to manage our memory accordingly no memory leaks! O Can use Valgrind to check our program for memory leaks any leaks in memory will result in a deduction of points.

When you start the program, you should provide the user with a menu choice to do one of the following:

1. Add New Player

2. View Players

3. Exit Program

Upon completion of Options #1 or #2 the menu should once again be displayed to the user thus allowing them to make another selection. This process should continue to loop until the user selections Option #3. Once/If eleven (11) Players have been entered the program should print the roster and terminate.

Below is example output of what your program should display when executed.

Welcome to Roster Editor!

1) Add New Player

2) View Player(s)

3) Exit Program

Please enter your selection: 1

Please enter a first name: John

Please enter a last name: William

Please enter a number (1-99): 24

**Player Created**

1) Add New Player

2) View Player(s)

3) Exit Program

Please enter your selection: 2

**IUPUI Football Roster**

15) John William

*************************

1) Add New Player

2) View Player(s)

3) Exit Program

Please enter your selection: 5

Invalid Choice! Please select Option #1, #2, or #3.

1) Add New Player

2) View Player(s)

3) Exit Program

Please enter your selection: 3

Thank you for using our program - Goodbye!

Thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

Students also viewed these Databases questions