**Click once—type in course code—do not use return key** (2004) COMP 1045 Programming Concepts Assignment 2 - Programming with C UniSA STEM The University of South Australia May 2020 2 of 30 Contents...

I have attached the assignment file


**Click once—type in course code—do not use return key** (2004) COMP 1045 Programming Concepts Assignment 2 - Programming with C UniSA STEM The University of South Australia May 2020 2 of 30 Contents Introduction Graduate Qualities Practical Requirements Stages Submission Details Extensions and Late Submissions Academic Misconduct Marking Criteria Sample Output 3 of 30 INTRODUCTION This document describes the programming assignment for Programming Concepts. The assignment is intended to provide you with the opportunity to put into practice what you have learnt in the course by applying your knowledge and skills to implement a program that will manage a simple social network (using an array of structures). You are to write a program (using multiple C source files) that will keep a record of profile information. Personal profile information will be stored in a text file that will be read in when the program commences. Once the application has read the initial profile information, it should allow the user to interactively query and manipulate the profile information. This assignment is an individual task that will require an individual submission. You will be required to submit your work via learnonline before Monday 15 June (swot-vac week), 11.30pm. Students are not required to demonstrate their work in person. This document is a kind of specification of the required end product that will be generated by implementing the assignment. Like many specifications, it is written in English and hence will contain some imperfectly specified parts. Please make sure you seek clarification if you are not clear on any aspect of this assignment. GRADUATE QUALITIES By undertaking this assessment, you will progress in developing the qualities of a University of South Australia graduate. The Graduate qualities being assessed by this assignment are:  The ability to demonstrate and apply a body of knowledge (GQ1) gained from the lectures and text book readings. This is demonstrated in your ability to apply programming theory to a practical situation.  The development of skills required for lifelong learning (GQ2), by searching for information and learning to use and understand the resources provided (supplied assignment files, C standard library, lecture notes, text book, practical exercises, etc), in order to complete a programming exercise.  The ability to effectively problem solve (GQ3) using the C programming language to complete the programming problem. Effective problem solving is demonstrated by the ability to understand what is required, utilise the relevant information from lectures, the text book and practical work, write C code, and evaluate the effectiveness of the code by testing it.  The ability to work autonomously (GQ4) in order to complete the task.  The ability to behave ethically (GQ5) by ensuring that you abide by the University’s policies and procedures relating to academic integrity as they apply to assessment. Your solutions must be your own work.  The use of communication skills (GQ6) by producing source code that has been properly formatted; and by writing adequate, concise and clear comments.  The application of international standards (GQ7) by making sure your solution conforms to the standards presented in the programming practices lecture slides (available on the course website). 4 of 30 PRACTICAL REQUIREMENTS It is recommended that you develop this assignment in the suggested stages. It is expected that your solution WILL include the use of the following: Your program must be developed using multiple C source files, with the number and names of all the files strictly adhering to the specifications below. Your program must be developed with two C source files and one header files. These files must be:  assign.c - This file contains the main() function and contains code to implement the interactive mode, which uses the functions contained in profile.h. It allows the user to interactively query and manipulate the profile information. The array of structures for the profile information must be defined within the main() function in file assign.c. profile.h - Provided for you on the web. This file contains the function prototypes for functions to load, query, and manipulate the profile information (stored in the array of structures). This file must not be altered with the exception of completing the data structure declaration.  profile.c - This file contains the implementations of the function prototypes listed in profile.h. It may also contain additional functions (to assist in your implementation of the functions listed in profile.h) 5 of 30 It is expected that your solution WILL also include the use of the following:  An array of structs that will store profile information (defined in the main() function).  A variable which records the number of profile records stored in the array (defined in the main() function).  No global variables.  The supplied profile.h file which must not be altered with the exception of completing the data structure declaration.  Appropriate functions – 1 idea per function.  Pass-by-reference parameters.  Use of #define for symbolic constants (i.e. #define MAX_PROFILES 50). No magic numbers.  Well constructed loops. Marks will be lost if you use break, quit(), exit() or return statements or similar in order to exit from loops.  Output that strictly adheres to the assignment specifications. If you are not sure about these details, you should check with the ‘Sample Output’ provided at the end of this document.  Good programming practice: o Consistent commenting, layout and indentation. You are to provide comments to describe: your details, program description, ALL variable definitions, all function prototypes and all function definitions, and every significant section of code. o Meaningful variable names. No single letter variable names. Your solutions MUST NOT use:  break, or continue statements in your solution. Do not use the quit() or exit() functions or the break or return statements (or any other techniques) as a way to break out of loops. Doing so will result in a significant mark deduction. A portion of the marks will be allocated according to your use of the above. Refer to the C programming practice slides (available on the course website) and ensure your code adheres to the standards/conventions described in these slides. PLEASE NOTE: You are reminded that you should ensure that all input and output conform to the specifications listed here; if you are not sure about these details you should check with the sample output provided at the end of this document or post a message to the discussion forum. Please ensure that you use Microsoft Visual Studio or equivalent in order to complete your assignments. Your programs MUST run on the version of Microsoft Visual Studio on your personal device and/or on the campus computer pools. 6 of 30 INPUT When your program begins, it will read in profile information from a file called profiles.txt. This is a text file that stores information relating to a simple social network. The table below details the information provided for each profile. Field No. Field Name Description 1 Given name up to 30 characters 2 Family name up to 30 characters 3 Email address up to 50 characters 4 Status Up to 100 characters 5 Number of friends an integer 6 Friends An array of strings (max size 5), i.e. a 2D array to store email addresses (up to 50 characters) of friends. Figure 1: ProfileRecord Structure. The person’s given name, family name and email address are stored on one line and are separated by the space character as seen below. The very next line stores the person’s current status. The number of friends (corresponding to email addresses) is stored on a separate line (below the status), followed by the email addresses of the person’s friends in the array of profiles (each email address is on a separate line as seen below): Fox Mulder [email protected] The truth is out there! 1 [email protected] Tony Stark [email protected] Saving the world is hard work - no time for friends. 0 Phil Dunphy [email protected] wtf? = why the face? 2 [email protected] [email protected] Rosa Diaz [email protected] All smiling is horrible. 1 [email protected] David Rose [email protected] I'm trying very hard not to connect with people right now. 0 Gina Linetti [email protected] Mmm-kay. No hard feelings, but I hate you. Not joking. Bye. 3 [email protected] [email protected] [email protected] Alexis Rose [email protected] I don't skate through life, David. I walk through life in really nice shoes. 5 [email protected] [email protected] [email protected] [email protected] [email protected] Eleanor Shellstrop [email protected] Somebody royally forked up man! 4 [email protected] [email protected] [email protected] [email protected] Figure 2: Profile information file format (profiles.txt). An example input file called profiles.txt can be found on the course website (you are not required to create it yourself). You may assume that all data is in the correct format. After the program has stored the data (using an array of structs), it will enter interactive mode as described in the following section. 7 of 30 INTERACTIVE MODE Your program should enter an interactive mode after the profile information has been read in from the file. The program will allow the user to enter commands and process these commands until the quit command is entered. The following commands must be allowed: Command Description list Displays for all profiles, the person’s name (given and family), email address, current status, number of friends and a list of their friends. Outputs the contents of the array of profiles as described in the section ‘Screen Format’ below. search Prompts for and reads the
Jun 11, 2021COMP 1045University Of South Australia
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here