写Health Club Membership Management System,通过录入输入文件,存储记录。 General DescriptionThis individual programming assignment consists of THREE PARTS, and is worth 22% of the assessment of this course. In this individual assignment, you are to develop Java software for Health Club Membership Management system (HCMM). PART ONE (2 Marks) requires that you submit a design draft of the assignment. Your tutor will provide you some critical feedback on your design draft. In turn, this feedback should be used to further improve your software development. Your design draft should describe: 1) all the classes needed and their responsibilities, 2) the fields and non-trivial methods of each class, 3) the relationship of the classes. PART TWO (2 Marks) requires you to demonstrate a prototype of your software using lab computers. At this stage, you must demonstrate that: 1) your code compiles and runs via command line, 2) your programs are able to read from and write to files, 3) your programs have ‘add’ ‘delete’ functionalities, 4) your software can be run with simple inputs, and produces some outputs accordingly. PART THREE (18 Marks) is the completion of the software development assignment. Software DescriptionsFunctionalitiesIn this individual assignment, you will create a Java software package to process the records in the membership management system according to the given instructions/commands. Your Java software MUST provide ALL the following functionalities: Read from TWO inputs files: membersFile and instructionFileWhen the HCMM system starts up, it assumes that the system has the members’ information as given in the membersFile, and it manages the records according to the instructions in the instructionFile. membersFile contains a list of members with basic information in a predefined format. instructionFile lists instructions/commands to be performed in order on the members. The instructions/commands can be: “add”, “delete”, “sort” and “query”. Add valid membership info into your system Your HCMM system must check whether this is an existing member: if there is already a record with the same name and mobile in your system, the existing record should be updated/merged with the new valid input information; otherwise your system adds a new member with valid info to the system. For instance, the instruction: add name James Bloggs; birthday 20/12/1978; pass Gold; mobile 04111111; fee $60 is supposed to add/update a member with name “James Bloggs”, birthday 20/12/1978, membership pass type “Gold”, membership fee $60, and the specified mobile information. Note the use of a semicolon (“;”) to separate the fields. Delete the member and associated information from the system by name and mobile For instance, the instruction: delete James Bloggs; 04112541 indicates deleting the member whose name is James Bloggs and mobile is 04112541 from the system. Sort the members and Save the results to the resultsFileSort the members by name in ascending/descending order. If there are more than one members having the same name, sort the members with same name in ascending/descending order of mobile numbers. The formats are listed below: sort ascending sort descending Query the statistics using the following instructions and Save the query results to the reportFile.Query results from different queries should be appended and separated by dash lines. a) Query the membership records of a given pass type and calculate the total membership fees.For queries with more than one member in query results, sort the results in ascending order of name. When there is more than one member with the same name, sort the results in ascending order of mobile numbers. The format of the query instruction is listed below: query pass Silver b) Query the age based fee income distribution and save the query results to the reportFile. The format of the instruction is listed below: query age fee Save the resulting data collection to output file(s) Write the resulting data collection of the instructions of “add”, “delete” and “sort” into the specified resultFile. Write the query results into another specified reportFile. When there are more than one“query” commands, append the latest results to the end of the reportFile. Separate the results of different query instructions using dash lines with query instructions. Data Format Member record specification: input membersFile has records and each record has information about a member. There may be 7 fields: 1) name in the form of a string of forename(s) and surname, all in one line; and the name cannot include numeric or punctuation characters. 2) birthday in the form of d(d)-m(m)-yyyy or d(d)/m(m)/yyyy (leading zero in day or month could be omitted, i.e., both 05-04-2012 and 5/4/2012 are both valid and identical). 3) mobile is in the form of a sequence of 8 digits. The leading zeroes cannot be ignored. 4) pass in the form of a string. The available passes are: Gold, Silver, and Bronze. 5) fee in the form of a leading $ sign followed by a numeric value with no gaps. For output, the fee should retain 2 decimal points accuracy. 6) address in the form of a series of Strings that may span more than one line. 7) email which must be a valid e-mail address, with no gaps, like this:abcdefg.123@gmail.com, so a string with alphabetic, numeric and punctuation characters and an “at” (@) symbol inside. Name and mobile are compulsory and required for all records when they are read in from the membersFile. That is, you may have a member record with name and just mobile, or another record with all seven fields in. Fields may occur in any order. Information for next member is separated from those of previous one by blank line(s). Output Format The resultFile should have all the appropriate and valid records in it The output records should follow a consistent format Each field should fit in ONE line only Again, output records should be separated by single blank line. Example“membersample1.txt” is a sample input membersFile, with records as below: name Taylor Bloggs
address 1 Grace Street,
Lane Cove, NSW, 2066
mobile 02993829
fee $15.5
“instructsample1.txt” is a sample input instructionFile with a list of instructions as below: add name Taylor Bloggs; mobile 02993829; email t.bloggs@gmail.com;
pass Bronze; fee $25; birthday 13-1-2005
add name Pac White; birthday 2/12/1978; pass Bronze; mobile
02000011; fee $80 query pass Bronze
The resultFile is expected to contain the records as below: name Taylor Bloggs
birthday 13/01/2005
mobile 02993829
pass Bronze
fee $25.00
address 1 Grace Street, Lane Cove, NSW, 2066 t.bloggs@gmail.com