Question: You are requested to develop an application for Member Registration at a Sport Club. You are required to add members, determine the date of birth

You are requested to develop an application for Member Registration at a Sport Club. You are required to add members, determine the date of birth and display all the available members. You are required to develop an application that would accept member registration data that is stored in a .csv file called MembersSport.dat. Read from the file and populate the arrays and members in the class MemberRegistration. Save as MemberRegistration.hpp/cpp. The Member Registration information includes ID number, Surname, length, first name and sport activity that the member wishes to register for. As displayed in Table 1 below.

You are requested to develop an application for Member Registration at a

The application must consist of the following classes: Member: defines Member attributes. Member Registration defines the business processes which includes adding members and determine date of birth. You will be provided with the Member class as shown in the UML class diagram below, which must be used for this application.

Sport Club. You are required to add members, determine the date of

Now follow the UML class diagram and description below and complete the MemberRegistration class. MemberRegistration - Member: Member [LEN] - counter: int + MemberRegistration() + addMemberRegistration(Member m) : void + readMember(string fileName) : void + getCounter(): int + getMemberAt(int index): Member + extractDOB(string id) : string Attribute/Method Description Marks member counter Data members. Member is an array that will store objects of type Member. Counter is of type integer and must be used to keep track of the number of objects in the array. (Marks allocated in the header) 3 MemberRegistration () This constructor is used to initialise counter to default values to default values. 1 void addMember(Member); This method must receive an object of type Member as a parameter. The method must add the object to the array of type Member and increment the counter. 3 readMember(string) The method must receive filename as parameter and must populate data members with information read from the file. A record in the file will always be in the format of: ID, Surname, Surname, Length, First Name, Sport. 8204214786034,Mashebu,178,Selest,Hockey The first is the learners ID. The second is surname. The third is length. The fourth is first name. The fifth is sport. A comma is used to separate data items in the file.

Once the data is read from the file and been assigned to the different data members, set an object of type Member with the data. Then add() the set object to the array data member of type Member (add the RegisteredMember). NB: Use the getline() function when reading from the file. extractDOB(); This method must extract date of birth of the registered member. And return object of type Member. 5 getCounter() Accessor method for counter. 1 getMemberAt(int) The method must receive an index of type int and return an object at that given index. 1 Create the following front-end function in a file called RunQuestion3.cpp. Please remember that you may not duplicate any source code whose functionality already exists. In the main function you must: Declare an object of type Member and type MemberRegistered that will be used throughout the program and any variables needed. Create the following menu that will repeat till the user chooses option 0. Menu Option Description 1) Read data from the file This option must read the data from the file, which consists of reading, assigning the read data to Member data members, and adding a member object to the array. Refer to Figure 1. 2) Display registered members and extract date of birth This option must display all the members in the array. The data that must be displayed in a tabular form with heading and the following field: Id First name Surname Sport Length Birth date NB: use the getMemberAt(int) when displaying all members Refer to Figure 1. 0 Terminate the program (Refer to Figure 1).

birth and display all the available members. You are required to develop

ID Number 8204214786034 7911025678012 8409157345067 8110113564098 8312215693029 7811015698098 8102254675034 Surname Mashebu De Waal Sekunene Hadunsa Halenke Mashishi Phatuma Table 1 Length First Name 178 Selest 191 Robert-Christoph 189 Albert Tuse 172 Mhpo 169 Thomas 185 Ronald Carol Sport Hockey Soccer Cricket Tennis Rugby Soccer Tennis 162 1: Read data from a file 2: Display all registered members and birthdate : The option selected is : 1 Successfully read from file. 1: Read data from a file 2: Display all registered members and birthdate. The option selected is 1:2 Surame Mashebu ID 8204214786834 7911025678912 9489157345067 1110113564098 B312215693829 7811015699298 3102254675034 More Selest Robert Albert po Sekune Hadumsa Halenke Mash Phatuna Sport Hockey Soccer Cricket Tennis flugby Soccer Tennis Length 178 191 189 172 169 185 162 Birthdate 1982/84/21 1979/11/02 1984/09/15 1981/10/11 1983/12/21 1978/11/01 1981/02/25 Ronald Carol 1: Read data from a file 2: Display all registered members and birthdate The option selected is. Figure 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!