You have been contracted to develop a prototype system for the Norman Manley Airport that will assist the airline staff in processing persons who have checked in for their flights during the covid pandemic. The information being stored for each person are as follows:
• ID#
• Name
• Gender
• FlightNo
• Priority
There is no way of determining the number of persons who will check in daily, so your solution should implement an appropriate data structure that is able to handle this level of uncertainty. Each person has a Priority Level of either 1 or 2 that will indicate the urgency at which they are processed – with 1 being the most urgent.
Processing Requirements

  1. Generate a random set of data representing customer arrivals at time t=0, t=1 and t=2. The number of arrivals can range from 1 to 6. (Assume single travelers for simplicity)
  2. Display an appropriate heading to represent the passing of time and display the data that was generated by using the following format: [trn, name, gender, flight, priority]. Each data item is to be placed on a newline.
  3. Add each person to the list in order of arrival and according to priority level. (note: persons with priority 1 are to be placed before persons with priority 2. A new priority 1 person is to be placed behind existing priority 1 individuals)
  4. Display the list to ensure that the order of arrival and priority levels are being maintained.
  5. Produce the following reports from the list:
    • Number of level 1 males on each flight
    • Number of level 1 females on each flight
    • Number of level 2 males on each flight
    • Number of level 2 females on each flight
  6. Process the list by generating a random number between 3 and 5 that will indicate how many persons to remove from the list. Persons are removed from the front of the list and the state of the list is to printed at each interval with an appropriate message to indicate the passage of time. The program should terminate when the list is empty.

If this was such a job the first move would be to meet and discuss changes to support multiple users, a web interface and more. No one today would write this in c++.

commented: I’m not so versatile in java, is there any way you or anyone else could help? +0

https://www.daniweb.com/welcome/rules has an entry about homework. You didn't reveal this was homework so I took it as a possible but unlikely real job you and your company would bid on. That said, this would be best made as a web app with the usual PHP, SQL and such backend with a web browser for the users. Such an endeavor would not be without a year or two making smaller systems to work your way up to the app/system in your top post.

Now if this is homework, say so and tell where you are stuck. For homework you supply something you are stuck on, and maybe the function that doesn't work right along with code so others can look at it to see if they see the problem.

Definitely homework, apparently from University of Technology of Jamaica (which fits with the reference to Norman Manley Airport, a real airport in Kingston). If that link is anything to go by, the project is meant to be solved in Java.

If so, I guess my first question to the OP is, why tag it as C++ if it needs to be done in Java?

My second question is, what have you tried doing on the project so far? Please post your code in your messages, or at least give us a link to an offsite repo which we could view (and yes, I recommend having all programs placed into version control and stored on an offsite repository on a host such as GitHub, even homework problems).

We cannot and will not provide code for you, but we can help you by giving advice on how to fix the code you have written.

having worked until very recently on ACTUAL airport software, I can tell you this is indeed not anything real. It's a simple homework assignment.

Nothing wrong with those, they're supposed to be simplified. But they're also supposed to be implemented by the pupil or student, and not strewn around the internet in the hope someone will provide you with an implementation you can then turn in as your own and get a good grade for without having put in the actual work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.