· Jack Young · Education · 7 min read
Unit 6 (P6, M2, D2): Designing a Solution
Design a solution for a new membership program that will allow to store details, including a photo and randomly generated membership ID.
Requirements
Use appropriate tools to design a solution to a defined requirement (P6)
Fitz Blitz is an independent gym who has previously been using a paper based system to keep track of their members and their details. They would like a new membership program that will allow them to store details, including a photo and randomly generated membership ID.
Details I may need to collect
- Name
- Member details (Photo, Age, Gender, Expiry date for membership, Type of membership, Join date)
- Randomly Generated Membership ID
Input, Output & Processing
When a customer purchases a type of membership via Fitz Blitzs’ software, then those details that the customer has inputted into the registration form automatically gets registered and added to a txt file. In addition to this, upon registering, the customer is also generated a random membership ID which is generated through the software so it can be uniquely identified easily when the membership card is used, such as checking in and out of the gym. This means that Fitz Blitz can know what times and days their customers are attending the gym and can possibly help them with different programs or diet which would prove useful and send offers to their email address. The uniquely generated membership ID is automatically activated (after a successful purchase) and can be used immediately. This makes it easier for Fitz Blitz to keep track of members they have. If the membership reaches an expiry date, then Fitz Blitz is able to easily deactivate the membership. This is automatically processed by the software calculating the current date and the date that is set one month after purchase, if these two dates meet or is over the date (for whatever reason), it can automatically send that customer an invoice of a payment, if that payment is not received in 7 days, then cancel membership. Furthermore, the customer is not allowed to use the membership if the ID I flagged as overdue. If the customer pays the monthly fee again, then the membership is automatically activated with ease.
User Interface
The user interface of the software is planned to be efficient and easily accessible to both the customer and for administration purposes. Registration is easy for the customer with few restrictions in place such as they must use at least one capital letter and number(s) in their password. The administration staff can see who is currently a member with a click of a button (the staff must be logged as admin to see the administration control panel).
Constraints
When the customer is registering, there will be some constraints that they need to follow. For example, the customer must use at least one capital letter and number(s) in their password in order for it to be classified as a strong password. Also, the customer would need to fill in every entry box, if an entry box returns null, then registration is unsuccessful.
Timescale
These are the tasks that need to complete with a rough estimate for how long each task may take to create:
Time (Minutes) | Task Description |
---|---|
15 | Design a UI for the login screen (Buttons, Labels, Entry Boxes and add a title for the window itself with Fitz Blitz Logo) |
30 | Make a working Login section (which reads from a .txt and compares to the value in the entry box) |
10 | Design a UI for the registration screen (Buttons, Labels, Entry Boxes) |
35 | Make a working Registration form (which writes into a .txt file) |
15 | Add constraints to the Registration and Login form (password and confirm password must match and all values in the boxes must be filled) |
10 | Add error message boxes when these constraints occur (which tells the user that something is wrong) |
5 | Add a window when login is successful |
15 | Add customers details to the window (reads from .txt file) |
Data Types and Software Structures
I am going to use a variety of data types to design a solution for Fitz Blitz. I am going to use the Boolean tool to set a true or false value that defines whether the membership is ‘Active (true)’ or ‘Not Active (false)’. This configures weather or not certain commands should function, such as: if Boolean = false, set this membership ID to Not Active in the txt file “N:\My Documents\…\Members.txt” and disable the use to access Membership commands, such as checking in and out of the gym.
Strings will play a big part in my design solution. I will be using strings to write to the txt file to save customers details. This means I can easily read the file and pull out strings to see if the username and password is correct etc.
I will also be using integers as I will be working with whole numbers. I will be using the current date as an integer and compare with the expiry date to see if they are greater than using the if statement, this then triggers the Boolean variable.
I have been playing around with Python and I figured out an algorithm which turns date into an integer:
year = repr(datetime.datetime.now().year)
if datetime.datetime.now().month <= 9:
oneMonthInt = (datetime.datetime.now().month + 1)
oneMonth = "0" + repr(oneMonthInt)
month = "0" + repr(datetime.datetime.now().month)
else:
oneMonthInt = (datetime.datetime.now().month + 1)
oneMonth = repr(oneMonthInt)
month = repr(datetime.datetime.now().month)
if datetime.datetime.now().day <= 9:
dayInt = (datetime.datetime.now().day)
day = "0" + repr(dayInt)
else:
dayInt = (datetime.datetime.now().day)
day = repr(dayInt)
date = year + month + day
exdate = year + oneMonth + day
It is a simple design in which in the final solution, I can add on an ‘if statement’ to see if ‘date’ is greater than ‘exdate’ which decides whether the membership is valid or not. I will be using this algorithm in the final design as it is a good expiry system for the software.
I am going to use classes to define each frame within one window. Each class has their own set of code which defines what is in the frame. This way makes it neat and easy to maintain the code because it is nicely split into classes.
Choice of Data Types and Software Structures
Justify the choice of data types and software structures used in a design solution (M2)
The reason why I have decided to use the Boolean data type to set the membership to active and not active so that is saves memory and is easy to process since it only has two statements.
The reason why I have chosen to use strings is that my design solution would require reading and writing strings to a .txt file. Strings are the only data type that can handle words so it is vital for me to use.
I am using integers because I will not need to use any decimals. This also makes the code faster and it will use less memory to process the code.
The reason why I am doing classes in my code is to easily separate each frame within the whole window and it makes it easier for me to code. Also, it provides a solid foundation for me to work on and develop more windows with ease.
Evaluation
Develop algorithms to represent a design solution (D2)
The final outcome of the design solution was the closest I can achieve with my ability with python and the limitations of the school facilities.
I was not able to upload a photo without using an external module. I also was limited to the .txt file by which I only made one account which was the admin account. I also never made a control panel which looks at all of the members as I can only create one. Apart from this, I was able to do most of the things stated in my design solution to the best of my ability and I think I did very well.