CSC5020 - Foundations of Programming Assignment

Assignment Help Other Subject
Reference no: EM133142605

CSC5020 - Foundations of Programming Assignment - University of Southern Queensland

Goals and Topics - The assignment problem is straightforward. All necessary details have been supplied. The solution to the problem will use the programming concepts and strategies covered in workshops

1-10 delivered in the course. The subgoals are:

-Obtaining an advanced understanding of values, variables and lists;

-Understanding program input and output, functions and expressions;

-Understanding simple strategies like iteration, validation, sum and count;

-Understanding of advanced strategies like swapping, sorting, tallying and searching;

-Translating simple design into Python code;

-The mechanics of editing, interpreting, building and running a program;

-Testing a program;

-Commenting source code, especially Docstring on functions;

-Becoming confident and comfortable with programming in small problems.

The Task - In this assignment, you are required to design, implement and test a program that can be used to manage a simple personal Schedule with appointment records, which are stored in a list.

Your program must provide an interactive design that allows the user to:

-create new appointment records and add them to the Schedule;

-display all appointment records with details;

-sort all appointments based on an attribute;

-search for specific appointment records in all records based on an attribute.

The program is to be implemented by Python and as a .ipynb file running on Jupyter notebook.

Your Tasks - It is strongly suggested that the following approach is to be taken to design and implement the program.

Five Input Functions

You should first design, implement and test the input functions of Schedule. You need to create 5 input functions (refer to Figure 1). For example, the second input function is applied to enter the date with the hint "Please enter the date of your new appointment, e.g. 25/9/2022". You are welcome to design your 5 input functions and IDE, as long as they can input the priority, date, start time, end time and subject of the new appointments similar to the sample IDE shown in Fig. 1. The 5 inputs for each appointment record will be stored as a string (record) in the appointmentList.

All the functions except built-in functions should be presented with proper Docstrings.

The addRecord() Function

You should design, implement and test a function which adds an appointment record to the Schedule. An appointment record will be added to the Schedule each time when the 5 inputs of the appointment record are all valid. If any input is invalid, display an error message and ask user for another input. The function handles the following tasks:

-Collect all data (priority, date, start time, end time and subject) for the appointment record (assigned them to a string as "High;23/9/2022; 9; 10; CSC1401 class", other formats for the string are not acceptable for this assignment);

-Validate if the input for "Date" is correct regarding the specification in the Date section by using the function isValidDate() described below;

-Validate if the input for "Time" is correct regarding the specification in the Time section by using the isValidTime() described below;

-A non-empty string within 30 characters (including space between words) for the subject.

-"Low" and "High" are the only two valid inputs of priority, case insensitive.

-Call isConcurrentAppointment() first then add the valid appointment record into the appointmentList list if all data are valid;

-The program will repeatedly ask users to input the record until "END" is input for the date. Call showRecords() to present the table of all the records.

The showRecords() Function

You should design, implement and test a function to print all existing records in a "table" as the Figure 2 after the task of Input Functions is completed. The function should access the appointmentList and print all existing appointment records (no requirement about the order) in the table.

-a "table" including headers, "--" which separate the header from the content of each record.

-The number of "-" is equal to the maximum number of text or the length of the header for each column.

-Indentation is appropriate as shown in Figure 2.

You could create some dummy appointment records manually and store them in the appointmentList to test this function, while other functions still remain incomplete.

The isValidDate() Function

You should design, implement and test a function to validate the data input for the Date attribute of an appointment record. The function should alert an error message and return false if the input is invalid, otherwise, return true.

-Refer to the Date section for what the function needs to check for validation.

-To evaluate students' string handling capabilities, only the "25/9/2022" date format is a valid input format for 25th September 2022. Use of built-in functions or some libraries to input valid date is not acceptable for this assignment.

-You can revise the date validation code in your assignment1 for this function.

The isValidTime() Function

You should design, implement and test a function to validate the time input for the start time and end time attributes of an appointment record. The function should alert an error message and return false if the input is invalid, otherwise, return true. Refer to the Time section for what the function needs to check for validation.

The isConcurrentAppointment() Function (Challenge task)

You should design, implement and test a function to validate if the input data for the Date, Start Time and End Time of an appointment is concurrent to any existing appointments in the appointmentList. The time of two appointments is considered concurrent if the time span for the two appointments overlap each other in full or in part. Note that an appointment can start at a time when another finishes, or vice versa. An appointment starts and finishes on the same day.

The function should alert an error message and return true if the input appointment is concurrent with any existing appointments in appointmentList, otherwise, return false.

The sortRecords() Function

You should design, implement and test a function to allow the user to sort all appointment records in appointmentList based on Priority, and then display the sorted appointment records of Schedule when the user enters the corresponding keyword. The program will repeatedly ask users to input the keyword (e.g. the hints "Do you want to sort the appointments by priority, Yes or No". Only "Yes", "No" are valid inputs, case insensitive) until "No" is entered to stop the iteration.

You should use the following suggestions as the guideline:

Priority: "High" to "Low" (For the "High" or "Low" groups of records, no requirement about the order if the priorities of records are the same);

You should use string handling techniques to extract the corresponding attribute values from the appointment records and sort the appointment records based on these values. The outcome should be similar to Figure 3.

The tallyRecords() Function

You should design, implement and test a function to calculate the number of appointments based on one of the two attributes: 1.date, 2.priority and display the total number of appointment records of Schedule when the user enters the corresponding keyword. The program will continuously ask users to input the attribute (e.g. the hints "Do you want to tally the appointments by date, priority or year". Only "date", "priority", "year" and "END" are valid inputs, case sensitive) until "END" is entered to stop the iteration.

You should use the following suggestions as the guideline:

a) Summary by date:

You can use different methods to achieve the goal. One option is as follows:

-Find all different dates in the appointmentList.

-For each date, count how many times it appears in the second part of the records.

b) Summary by priority:

-Find the appointments with different priorities by using a string search plan.

-Count how many records with "High" and "Low" priorities and show the number by printing a table as Figure 4.

c) Summary by year:

You can use different methods to achieve the goal. One option is as follows:

-Find all different years in the appointmentList.

-For each year, count how many times it appears in the second part of the records.

You have to list the results following a specific order of date (from an earlier date to a later date or from High to Low or from an earlier year to a later year).

The searchRecords() Function

You should design, implement and test a function to search the appointment records using the keywords given by the user. The program will repeatedly ask users to input the attribute (e.g. the hints "Do you want to search the appointments by date or subject". Only "date", "subject" and "END" are valid inputs, case insensitive). Once the valid attribute is obtained from users, the program will ask users to input the search keywords (e.g. the hints "Please enter the keyword for searching"). The requirements are as follows:

-The keywords for searchRecord() Function are case insensitive. That means no matter the users search "Class" or "class", the program will show all the records including "class".

Two examples: 1. Once the users search "a" by "subject", any record with subject including the character "a" will be displayed no matter the "a" is in "class" or "party".

2. Once the users search "1" by "date", any record with a date including the number "1" will be displayed. Note that "1" can be the value for day, month or year. However, "11" of the day, month or year and "1" in the subject do not count. That means if you search the "5" or "20" by date, the record with the date "25/9/2022" won't be presented in the output.

The program has to list the search results as Figure 5. There is no requirement about the order of display. Then ask users to input the attribute of searching again until "END" is entered to stop the iteration.

Program Integration Test

You need to test the program for all functionality thoroughly before delivering the program to clients. The program should be running appropriately without any syntax or logic errors.

Attachment:- Foundations of Programming Assignment File.rar

Reference no: EM133142605

Questions Cloud

Determine the market pay ranges and average pay : For this question, you are to access at three (3) relevant salary survey Web sites on the Internet (such as the Bureau of Labor Statistics, salary.com, or wagew
Developing accurate financial statement : Data points necessary for developing an accurate financial statement. Define terms for the staff.
Generational interaction skills : Definition - Generational Interaction Skills: As an applied skill, generational interaction skills focus on the way in which multigenerational team members inte
Mission and vision statement of organization : As a nursing leader you have been asked to assess the mission/vision statement of an organization.
CSC5020 - Foundations of Programming Assignment : CSC5020 - Foundations of Programming Assignment Help and Solution - University of Southern Queensland - Assessment Writing Service
Fitness and physical activity : Is it ethical for a fitness professional to continue to try to persuade an individual to make healthy lifestyle changes even when the potential client
Explain the best chance of success : In 1970, Dan and Real Seguin started NorOnt Limited. This northern Ontario based company manufactures and distributes various lines of prepared food products fo
Describe the training manager job role : Describe the Training Manager job role competencies (identify needs, develop & deliver solutions, manage technologies) clearly and list a KSAO for each.
Obtain approval for formal agreements : Why is it necessary to obtain approval for formal agreements?

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