The aim of this assignment is to make sure that you understand and are familiar with the concepts covered in the lectures, including basic C syntax, using pointers to access strings and multidimensional arrays. By the end of the assignment, you should have
CSE 240 Homework 5Array of Structures and Enum Types
Spring 2016 (50 points)
Due Saturday, February 20, 2016 at 11:59PM, plus a 24-Hour grace period
Introduction
The aim of this assignment is to make sure that you understand and are familiar with the concepts covered in the lectures, including basic C syntax, using pointers to access strings and multidimensional arrays. By the end of the assignment, you should have
- understood the concepts and operations of arrays, structures, and array of structures.
- written a program using an array of structures and operations on array of structures
Reading: Textbook Chapter 2, sections 2.5, and 2.6, and lecture slides covered.
Exercising: Complete the multiple choice questions in Textbook Section 2.10. The answers of the questions are available in course Web page.
You are expected to do the majority of the assignment outside the class meetings. Should you need assistance, or have questions about the assignment, please contact the instructor or the TA during their office hours.
You are encouraged to ask and answer questions on the course discussion board. However, in do not share your answers or code in the course discussion board. Do not cooperate with your peers in doing the individual assignments. We will use MOSS to check the similarities between all the submissions between all sections of the course.
Programming Assignment (50 points)
You are given a partially completed program hw05.c. Your job is to follow the instructions given in the program to complete the functions so that the program executes properly. A user is given the option to input a new student or print the student roster (list). When inputting a new student, the user is prompted for the student’s first name, last name, grade in the class, and education level. The add() function is worth 40 points and has very specific instructions on how the list is to be sorted. Follow these instructions very carefully while writing this function. You will also notice that this program has the option to save and load the list to and from a file. This feature is already implemented for you, but you should know how it works for future assignments. Here is an example output from a loaded file and the corresponding input.
Input:
firstName | lastName | grade | level |
George | Washington | A+ | s |
George | Bush | B | f |
Greg | Washington | B+ | s |
Barack | Obama | A- | j |
Abe | Lincoln | A | so |
Output:
Grading of Programming Assignment
The TA will grade your program following these steps:
(1) The TA will read your program and give points based on the points allocated to each component, the readability of your code (organization of the code and comments), logic, inclusion of the required functions, and correctness of the implementations of each function.
(2) Compile the code. If it does not compile, 20% of the points given in (1) will be deducted. For example, if you are given 20 points in step (1), your points will become 16 if the program fails to compile.
(3) If the code passes the compilation, the TA will execute and test the code. If, for any reason, the program gives an incorrect output or crashes for any input, 10% of the points given in (1) will be deducted.
What to Submit?
You are required to a file folder containing the required .c files, and the file folder must be compressed in the compressed format (.zip). Make sure your compressed file is labeled correctly – lastname_firstname5.zip. (All lowercase, do not put anything else in the name like “hw5”.)
The compressed file MUST contain the following:
hw05.c
No other files should be in the compressed folder.
If multiple submissions are made, the most recent submission will be graded. (Even if the assignment is submitted late.)
Where to Submit?
All submissions must be electronically submitted to the respected homework link in the course web page where you downloaded the assignment.
Late submission deduction policy
- No penalty for late submissions that are received within 24 hours after the deadline;
- 10% grade deduction for every day it is late after the grace period;
- No late submission after Tuesday at 11:59PM.
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
