Java代写:COMP9103 Health Club Membership Management System

代写Health Club Membership Management System,通过录入输入文件,存储记录。

General Description

This 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).

  1. 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.
  2. 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.
  3. PART THREE (18 Marks) is the completion of the software development assignment.

Software Descriptions

Functionalities

In 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:

  1. Read from TWO inputs files: membersFile and instructionFile
    When 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”.
  2. 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.
  3. 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.
  4. Sort the members and Save the results to the resultsFile
    Sort 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
  5. 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
  6. 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:[email protected], 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 [email protected];
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 [email protected]

name      Pac White
birthday  02/12/1978
mobile    02000011
pass      Bronze
fee       $80.00

The reportFile is expected to contain the records as below:

----query pass Bronze---
name      Pac White
birthday  02/12/1978
mobile    02000011
pass      Bronze
fee       $80.00

name      Taylor Bloggs
birthday  13/01/2005
mobile    02993829
pass      Bronze
fee       $25.00
address   1 Grace Street, Lane Cove, NSW, 2066
email     [email protected]

Total Fee: $105.00
--------------------------

Important Notes

  1. Your code must make use of at least one collection e.g., ArrayList.
  2. Your system must be able to handle both normal cases and difficult cases.
  3. You MUST NOT build a graphical user interface.
  4. You need to do systematic testing of the classes you create.
  5. Do NOT hard-code the names for the input and output files.
  6. Your program must run on the computers in your lab classes, and MUST be demonstrated during your laboratory class to your tutor in week 10 and in week 12. Absenting the demo will incur a penalty of 4 marks. If you miss the demonstration in week 8 and week12 because of serious illness or misadventure, you should request Special Consideration using the appropriate forms within a week.
  7. Recall that the University takes plagiarism very seriously.

Your software must be

  1. put into the java project package with name “HCMM17S1”
  2. invoked in the format: java HCMM17S1. HCMM membersFile instructionFile resultFile reportFile where HCMM is the name for the main class, membersFile, instructionFile, resultFile, and reportFile are names of files that will change between runs of the program.

Marking Scheme

There are 4 parameters on which your submission will be marked:

  1. Design [4 marks]: 2 marks at PART 1 (in week 9), and 2 marks at the final submission.
  2. Prototype Demo [2 marks]: in week 10.
  3. Implementation and testing [14 marks]: at the final submission.
  4. Standard of coding [2 marks]: at the final submission.

Submission

PART 1 Design Draft

  • Your design should describe all the classes that you plan to use, and the data and methods of each class, e.g. Class responsibilities and UML diagrams.
  • You will be asked to submit your draft through Turnitin on E-Learning. Turnitin is used to check the originality of your work against the database of student submissions, publications and internet content.

PART 2 Prototype Demonstration

You will demonstrate your program to your tutor in your scheduled lab in Week 10. Your program should have the basic functionality at this stage, and should be able to handle normal cases (i.e. cases where all field names/values are correct). You will get the mark as long as your program runs smoothly by being invoked from the command prompt using the sample testing files released in Week 9. This part will assess your progress and provide you with more feedback.