Create the function prototypes and empty function definition

Assignment Help Other Subject
Reference no: EM133121028 , Length: word count:750

Milestone

Milestone-3 completes the veterinary clinic system with the addition of appointment management functionality and the importing of patient and appointment information from data text files. You will need to create additional data structures along with several functions that will be responsible for carrying out the new appointment management menu options that perform specific tasks in the management of appointment data.

Specifications

Like Milestone-2, it is important to note that this code will not compile until you copy your work from Milestone-2 into the provided files for Milestone-3. You will also need to create some new data types, as well as define the mandatory uncoded function prototypes and definitions that are new to Milestone-3.

Three clinic module/library functions have been completely supplied for you: "displayScheduleHeader", "displayScheduleData", and "menuAppointment", along with two function prototypes: "importPatients" and "importAppointments" (responsible for data import). These functions provide you with the necessary framework to get started in this final milestone.

In this milestone, it is expected you will create additional functions as you see fit to help you get the job done. It is also expected you will follow and adhere to the structured design principles (Functions | Introduction to C (sdds.ca)).

When you create your own functions, be sure to organize them into the established commented sections for each module/library so you can easily find and maintain them:

Core
• User Interface
• User Input
• Utility Clinic
• Display Functions
• Menu & Item Selection
• Utility
• User Input
• File
Recommended Approach

You need to get the project ready for development so it can compile and test your new functions with actual data. It is recommended you develop the new components in the following sequence:

1. Create/define the new data types: Time, Date, and Appointment

2. Code the importPatients and importAppointments function definitions. The main function requires these functions to be working so the application can start with data preloaded.

3. Create the function prototypes and empty function definitions (stubs) for those functions called within the menuAppointment function.

Clinic Module
In this milestone, you will be working almost exclusively with the clinic module unless you find reason to add more generalized functions to the core module.

Data Structures
A few new data structures will be needed to represent the appointment information. This includes a Time, a Date, and an Appointment type. These types need to be defined in the clinic.h file (review the comments in the clinic.h file for placement).

Data Files
There are two data files you will need to import into the application. One contains patient data, while the other contains appointment information. These files are provided along with the project files on GitHub.

patientData.txt
The data fields for the patient data are separated by a pipe (|) character in the following order:
• Patient number
• Patient name
• Contact phone description
• Contact phone number

appointmentData.txt
The data fields for the appointment data are separated by a comma (,) character in the following order:
• Patient number
• Appointment year
• Appointment month
• Appointment day
• Appointment hour
• Appointment minute

Functions

Data Import (text files)

You must create the "importPatients" and "importAppointments" function definitions (in the clinic.c file) that will read-in the text data and store the data to their respective struct Patient and struct Appointment arrays. Review the main function to see how they are called. The function prototypes for these functions have been provided for you located in the clinic.h header file.

Here is a brief overview of how these functions should work. Both import functions should do the following:

• Read the data file (file name is provided in the first argument)
• Store the data to the second argument, an array of the respective struct data type
• Respect the array size specified by the 3rd argument even when the data file has more records
• Must return the total number of records read from the file and stored to the array, which may be less than the total number of records in the file

Appointment Management
To get you started, the appointment management menu and display functions have been provided for you:
• menuAppointment
• displayScheduleHeader
• displayScheduleData

Hints
• Create temporary empty function shells for the following functions:
o viewAllAppointments
o viewAppointmentSchedule
o addAppointment
o removeAppointment

All these functions are called from the "menuAppointment" function and will need to exist for you to be able to compile your code.

• Review the sample output text file (a1ms3_output.txt) that came with the project files to see how these menu options should work

viewAllAppointments
• Carefully review the sample output text file (a1ms3_output.txt) that came with the project files and notice the order of the data is not presented in the order it is positioned in the appointments array.
• At some point in the logic for this menu option, you will need to call the "displayScheduleHeader" and "displayScheduleData" functions

viewAppointmentSchedule
• This process should display only the appointments scheduled for a specific date. Therefore, the user must be prompted for a specific date (year, month, and day) prior to displaying the results.
• Date input prompting and validations must accurately determine the number of days in a given month and accommodate leap years
• Carefully review the sample output text file (a1ms3_output.txt) that came with the project files and notice the order of the data is not presented in the order it is positioned in the appointments array.
• At some point in the logic for this menu option, you will need to call the "displayScheduleHeader" and "displayScheduleData" functions

addAppointment
• This process should test if there is an available element in the appointments array for a new appointment to be added. Available appointments can be determined by testing the patient number which must be less than 1 to indicate an empty/available element.
• Validation of the entered patient number must be performed
• Appointment times must adhere to the following rules:
o Operation hours are determined based on macro's that define the start and end hours so they can be modified in one place without affecting the code logic
o The effective appointment start times must fall within the inclusive hour range defined by the macros mentioned above (example: 9:00 - 16:00, so the last valid appointment time can be 16:00)
o The entered minute value must align with the set appointment minute interval which should be represented as a macro so it can be modified in a single place and not affect the code logic (example: if appointments are in 15-minute intervals it is only possible to have appointments starting at 0, 15, 30, or 45 minutes on the hour)
o Only ONE appointment can occupy a time slot for the given year, month, and day (no double booking or overlap is allowed)
• Again, carefully review the sample output text file (a1ms3_output.txt) that came with the project files to see how this process should work.

removeAppointment
• Appointments are removed by patient number and a specific date (year, month, and day).
• The entered patient number must be validated as a patient who has not been removed from the patients array or the removal should be denied (this will ensure that past appointment data will remain intact).
• When an appointment match occurs (based on the entered patient number and date), the patient information details should be displayed, and user confirmation must be received to remove the appointment
• To mark an appointment as removed, the appropriate appointments array element must be set to a safe empty state.
• Again, carefully review the sample output text file (a1ms3_output.txt) that came with the project files to see how this process should work.

Instructions
• Create a text file named "reflect.txt" be sure to include your confirmation of authenticity and personal information at the beginning of the file and record your answers to the below questions in this file.
• Refer to the reflection rubric link noted at the beginning of this document on page 3
• Answer each question in sentence/paragraph form unless otherwise instructed.
• Do not include the question in your response.
• A minimum 600 overall word count is required.
• Whenever possible, be sure to substantiate your answers with a brief example to demonstrate your view(s).

1. This milestone required you to create additional functions that were not specified or provided for you. Briefly describe three functions you created and include the purpose and value those functions contributed towards the application. Organize your answer for each function by first including the function prototype (not the definition) followed by your explanation. (Minimum: 200 words)

2. The "addAppointment" function must perform many operations. How many lines of code did you use for this function? How many lines did you save by applying pattern recognition and the use of functions? Identify all the sections of logic you were able to consolidate into useful functions to help with readability and maintainability of the code. (Minimum: 200 words)

3. This milestone demanded a concerted effort in time management to insure you could complete the work on-time. Breakdown how you spent your week of development and include each function/section of logic you worked on describing the overall success/challenges you had along the way. (Minimum: 200 words)

Attachment:- Data Science.rar

Reference no: EM133121028

Questions Cloud

What is the management variance for chatham clinic : Chatham Clinic has accumulated the following information regarding its patient visits: What is the management variance for Chatham Clinic
Explain how the capital requirements in basel : Briefly explain how the capital requirements in Basel II (III) work. (interested in the basic principles that are the same in basel 2 and 3)
What is the current bond price : Staind, Inc., has 6 percent coupon bonds on the market that have 14 years left to maturity. The bonds make annual payments. If the YTM on these bonds is 9 perce
Propose an investment-financing package : You are a real estate broker eager to sell an office building, Le, a company for which the only asset is that building.
Create the function prototypes and empty function definition : Create the function prototypes and empty function definitions (stubs) for those functions called within the menuAppointment function
How much did you initially deposit : You made a single amount of deposit exactly 10 years ago, which has become $500,000 now.
What is the standard deviation of a portfolio : What is the standard deviation of a portfolio composed of 30% Stock A, 50% Stock B, and 20% Stock C?
Difference between lease financing and normal financing : State the difference between lease financing and normal financing giving appropriate examples.
Describe the future of data analytics in health care : What five words would you use to best describe the future of data analytics in health care? Please list your five words and explain why you chose each word.

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd