Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a new member. A member has a name, and an optional email address. If the member has an email address it must be unique

  1. create a new member. A member has a name, and an optional email address.
    1. If the member has an email address it must be unique (two different members cannot have the same email address).
    2. When a member is created the member is assigned a new unique random 6 character alpha numeric member id. This id must be unique and no other member in the registry should be able to get the same id.
  2. You should be able to list all members.
  3. You should be able to select a particular member see the detailed information about the member. You should then be able to:
    1. delete the member
    2. add a new boat. A boat has a name, type (sailboat, motorboat, motorsailer, or canoe). Depending on the type there could be different information needed:
      1. Sailboat: length in meter, depth in meter.
      2. Motorboat: length in meter, engine power in horse powers.
      3. Motorsailer: length in meter, depth in meter, engine power in horse powers.
      4. Canoe: length in meter.
    3. Select a boat and see the detailed information about the boat. You should then be able to:
      1. delete the boat
  4. You should be able to quit the application
  5. The registry information should be loaded from a file registry.data when the application starts. See the example.

MEMBER:Margaret H..t@nasa.gov:lkd432

BOAT:apollo1:sailboat:20:4

BOAT:appollo3:motorboat:20:50

MEMBER:Allan T..n@bletchleypark.org.uk:kh654s

BOAT:enigma:canoe:4

MEMBER:Barbara L..a@mit.edu:bg54w2

BOAT:substitution:motorsailer:17:4:30

MEMBER:Charles Babbage::8ww3ls


6. The registry information should be saved to a file registry.data when the application exits. example

MEMBER:Margaret H..t@nasa.gov:lkd432

BOAT:apollo1:sailboat:20:4

BOAT:appollo3:motorboat:20:50

MEMBER:Allan T..n@bletchleypark.org.uk:kh654s

BOAT:enigma:canoe:4

MEMBER:Barbara L..a@mit.edu:bg54w2

BOAT:substitution:motorsailer:17:4:30

MEMBER:Charles Babbage::8ww3ls

7. There should be at least one class diagram showing the application structure with all classes and correct relations between the classes. You do not need to add every operation in the class diagram.

8. Basic error handling, i.e. it should not crash. No need for user friendly error messages.

File Loading/Saving Format


The requirement is that the data of the application should be loaded from a file when the application starts, and saved to a file when the application ends. The idea is to load the whole file, convert it to nice to work with objects. When the user quits, the whole file is overwritten with new data. Trying to load/save continously or manipulate the file incrementally will only make things more complicated.

The format of the file is as follows:

MEMBER:Member Name:optional email adress:member id optional BOAT:boat name:sailboat|motorboat|motorsailer|canoe:boat length:optional boat depth|engine power: optional engine power

Extended Requirements

  1. You should be able to select a particular member and edit the member
    1. name
    2. email adress
  2. Select a members boat and edit its:
    1. name
    2. type
    3. type information (length etc.)
  3. Use the strategy design pattern to design and implement an extendible and flexible way of searching for members. For example searching for members with sailboats, or searching for members with a particular member id, etc.
  4. Extend the basic way of searching with the composite design pattern to enable boolean expression type searching. E.g. members with sailboats and boats with a length over 10m or a motorboat (type=sailboat and length>10) or type=motorboat. For this requirements it is sufficient that you design and implement, there is no need for adding a user interface for this.
  5. Unit testing - add a few automatic unit tests to the codebase. It should be something more than just simple getters and setters.
  6. The application should handle input-errors well with user friendly error messages.

Step by Step Solution

3.39 Rating (149 Votes )

There are 3 Steps involved in it

Step: 1

Here is a possible implementation of the application Member Class java public class Member private String name private String email private String memberId public MemberString name String email thisna... 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_2

Step: 3

blur-text-image_3

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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions