Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CODE: https://calu.desire2learn.com/d2l/le/content/3179339/topics/files/download/32504273/DirectFileTopicDownload
Download the files "ymca.java" and "member.txt" for this email
Open eclipse and create project, package and class called "ymca"
copy the code "ymca.java" (over top of the code that was generated in the step above).
Minimize the eclipse screen and drag the file "member.txt" into the main folder of the project. In this case, it will be the folder "ymca" that is directly under the eclipse workspace.
1. Add two new sets of parallel arrays to the program, these arrays will store the information that will be read in from the register.txt file. That file contains the member's code and the name of the class they will be registered for. The two parallel arrays will be names of your choice, but each will be defined as being 100 big.
 Need to define:
 Register Member code to be an Integer array defined as 100 big
 Register Class name to be a String array defined as 100 big
 Also need to define a new variable that will keep track of how many registration items that have been read in from the data file. This new variable will work with the registration file the
same way the variable mcount works with the member file.
2. Add code to the read_registration method. In this method, read in all data from the
register.txt file into the new parallel arrays defined in #1 above. This code is just like the code in the
method read_member where you are reading in the member information.
Have to change the call to the read_register statement passing the arrays and the count you defined in step #1 above.
 Drag the additional data file register.txt to the same folder where the file member.txt is.
Remember that the location of the data files is the main folder of your java project (just under the
eclipse workspace folder) (contents of the register.txt file can be viewed at the end of this
assignment)
3. Add code to the Modify member method. In this method, you will increment the member count
(mcount) and prompt the user for new member data to be read into the member parallel arrays. You will have to change the call to the modify_member method, passing the arrays and the member count

4. Add code to the Modify Registration method In this method, you will increment the registration count
(defined in step #1 above) and prompt the user for new registration data to be read into the registration parallel arrays. Will have to change the call to the modify_registration method, passing the arrays and the registration count
 The possible class names are:
 Yoga
 Karate
 AerobicsI
 AerobicsII
 SwimmingI
 SwimmingII

5. Add code to the exit_program method. In this method:
 Add the code to write the member data back to the data file member.txt.
 Add the code to write the registration data back to the data file register.txt.
 Will have to change the call to the exit_program method, passing the arrays and counts
6. Add code to the Report Method
 Will have to change the call to the report method, passing the arrays and the counts
 Change the menu text to the wording below
1. All Member Information
2. All Registration Information
3. All Members of a Specific type
4. All Members between a specific age range
5. All Members of a specific gender
6. Specific Member's Registration
7. Report 7
8. Report 8
9. Report 9
10. Report 10
11. Exit Report Menu
 Each report is defined as follows:
1. All Member Information - Displays all information on all members
2. All Registration information -Display all information for all registrations
3. All Members of a Specific type- Prompt for the type and then display all information for
members of that type
4. All Members between a specific age range - Prompt for the beginning and ending age, then
display all member information for the members within the date range
5. All Members of a specific gender - Prompt for the gender and then display all members of that
gender.
6. Specific Member's Registration - List of all classes a specific member is signed up for (prompt
for the member code) You must display all of the member's information and then search the
registration arrays and when there is a match on the member's code, print the list of all classes he
is registered for
7. Report 7 print message "Report 7 to be defined later"
8. Report 8 print message "Report 8 to be defined later"
9. Report 9 print message "Report 9 to be defined later"
10. Report 10 print message "Report 10 to be defined later"

1. Screen shot of Report #1, 2, 3, 4, 5 ,6 running seperatly
2 (add Member information) Screen shot of adding a new member
3 Screen shot of Report #1 running again
4 (add new registration information) Screen shot of adding a new registration
5. Screen shot of Report #2 running
6. Close the program...start it again. Screen shot of Report #1 running7
7. Screen shot of Report #2 running

What I have tried:

Everything. I don't understand what I'm supposed to be doing.
Posted
Updated 14-Apr-22 1:57am
v3

1 solution

Quote:
I don't understand what I'm supposed to be doing.

There is no way we can teach you how to read a requirement and understand it. You need to talk with your teacher, classmates can help too.
And doing your homework for you will not help you either.

Advice : Read again the requirement carefully, note what make sense to you, organize your understanding, read again and see if you can make sense of further things. step by step, you should be able to make sense of the whole requirement.

The requirement is a little lengthy, but not really complicated, and it is consistent.
As future professional programmer, you have to handle much longer requirements, more complicated, and often with inconsistent constraints.

- Learn one or more analyze methods, E.W. Djikstra/N. Wirth Stepwize Refinement/top-Down method is a good start.
Structured Programming.pdf[^]
https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design[^]
https://en.wikipedia.org/wiki/Structured_programming[^]
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra[^]
https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF[^]
Program Development by Stepwise Refinement[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900