Write your question here.
I must do a task for my education, but I don‘t know how I should begin. It would be nice, if someone could help me. :)
Here is the task:
An administration system for alpaca tours A local provider of trekking tours with alpacas would like to use the lockdown time to optimize the administration of his tours with one program instead of many colorful sticky notes. Task Write a program that fulfills these requirements: Record the tour data (via keyboard) Save the data in a text file Read the saved tour data from a text file Manage the tour data: o Search for a specific tour Delete an existing tour Delete all data records List all Tours End of program The following data belong to a data record Customer data (surname, first name, address) Date of the tour Number of participants Number of carers Number of animals Invoiced amount These data must be stored in a suitable struct (the address can be declared as a separate struct and used accordingly will).
The date must be entered in the ISO form YYYY-MM-DD, i.e. around 2021-01-15 for January 15, 2021 (this makes comparisons much easier).
The number of carers and animals is calculated from the number of participants, as is the invoice amount. Supervisor: a supervisor is required for every 5 animals that are started, i.e. one for 1-5 animals, two for 6-10 animals, etc. For safety reasons, at least two supervisors must always be present on a tour. Number of animals: Two participants share “one animal, if the number is odd, one participant may walk alone with the animal. A maximum of 12 animals are available for a tour (i.e. the number of participants must be checked accordingly) The invoice amount results from the number of participants and a price of € 25 per participant.
First think about the design. What input is needed, what are the output(s), what data is read/written to file(s)? Then what data structure(s) are needed? What algorithm is needed for tour requirements? What menu(s) are needed?
Then what classes/functions are required?
Then produce a program design that meets the requirements of the task. Once you have a valid design, then start to code the program from the design.
I find that rearranging your instructions is a good start. I am not sure what you were originally given, but when you post the directions here in 1 big block it makes it harder to understand what you need to do.
Looking at it this way goes along with what seeplus has said.
An administration system for alpaca tours A local provider of trekking tours with alpacas would like to use
the lock down time to optimize the administration of his tours with one program instead of many colorful sticky notes.
Task Write a program that fulfills these requirements:
• Record the tour data (via keyboard)
• Save the data in a text file
• Read the saved tour data from a text file Manage the tour data:
• Search for a specific tour
• Delete an existing tour
• Delete all data records
• List all Tours
• End of program
The following data belong to a data record Customer data (surname, first name, address) Date of the tour Number
of participants Number of carriers Number of animals Invoiced amount These data must be stored in a suitable struct
(the address can be declared as a separate struct and used accordingly will).
The date must be entered in the ISO form YYYY-MM-DD, i.e., around 2021-01-15 for January 15, 2021 (this makes
comparisons much easier). // <--- Would you be entering this into a string or 3 variables?
The number of carriers and animals is calculated from the number of participants, as is the invoice amount.
Supervisor:
a supervisor is required for every 5 animals that are started, i.e., one for 1-5 animals, two for 6-10 animals, etc.
For safety reasons, at least two supervisors must always be present on a tour.
Number of animals:
• Two participants share “one animal, if the number is odd, one participant may walk alone with the animal.
• A maximum of 12 animals are available for a tour (i.e., the number of participants must be checked accordingly)
The invoice amount results from the number of participants and a price of € 25 per participant.
You can always post what you have planned for more input.
Read the assignment once to get a sense of what's needed.
Read it again. This time, start writing down the data that you will need.
Read it again, flush out the data some more. Start writing the names of the methods that you'll need and what they will do.
Put the data into a header file (or the main file if the program will allow it).
Now here's a very simple but powerful technique: copy the entire assignment into the code file as a comment. Move the phrases of the assignment to the parts of the code that implement that part of the assignment. For example, a lot of the first paragraph describes the fields of your data structures. Comment each field with the text of the assignment that it represents.
Work to describe the functions and methods. What are the parameters? What are the return values? What do they each do? Put these things down as comments. DO NOT start writing code.
You may discover that part s of the assignment are unclear. Make a note of these things and prepare a list of questions for fellow students, the TA, or the professor.
Keep going back and forth: between reading the assignment and declaring your data and functions/methods. The goal is to get to the point where you understand how each part of the assignment will be handled by appropriate code or data. If it helps, add comments to the methods that describe what they do as pseudo-code.