Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

CSE 240 Homework 9: Class and Input/Output

CSE 240 Homework 9: Class and Input/Output

Due Saturday, March25, 2017 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 and input/output.  By the end of the assignment, you should have understood

  • Class, data members and function members
  • Program with multiple classes and header files
  • Memory management and garbage collection
  • C++ input and output

Reading: Textbook Chapter 3, Sections 3.1, 3.2, and 3.3 on C++ examples, class definition and memory management.

Preparation: Complete the multiple choice questions in the textbook exercise section. The answer keys can be found in the course Web site. These exercises can help you prepare for your weekly quiz and the exam. You are encourage to read the other exercise questions and make sure you understand these questions in the textbook exercise section, which can help you better understand what materials are expected to understand after the lectures and homework on each chapter.

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, do not share your answers and codein the course discussion board.

 

 

Programming Assignment (50 points)

You are given a partially completed project containing:

3 header files:

Container.h

Student.h

Absent.h

4 C++ files:

Container.cpp

Student.cpp

Absent.cpp

hw09.cpp

Your job is to follow the instructions given in the comments of the hw09.cpp and Student.cpp files to complete the missing parts of the project so that the program executes properly.

Q1: Constructor and Accessor Methods for Student class (5 points)

You will need to write the constructor and accessor methods for the Student class in the Student.cpp file. The program will not compile until this part is completed. The constructor and accessor methods are already declared in the Student.h file. (See Student.cpp file for details).

Q2: Add Absent and Last Absent Methods for Student class (10 points)

You will need to write these methods for the Student class in the Student.cpp file. The program will not compile until this part is completed. These methods are already declared in the Student.h file. (See Student.cpp file for further instructions).

Q3: Add Student Function (5 points)

When inputting a new student, the user is prompted for the student’sname and standard. This function will be used to add a new student to the head of the global linked list of containers. This means that no sorting is needed for this function. You will notice that the Search Student function is called before this function, therefore, you are to assume that the Student that you are looking for is not already on the list.(See hw09.cpp file for furtherinstructions).

Q4: Search Student Function (10 points)

This function is used to check if a Student exists in the global list of Containers. It is called before executing most of the other functionalities of this assignment. In order to find a Student on the list, you will need to check both the name and the standard of the Student. Students on the list may have the same name OR the same standard. Students on the list may not have the same name AND the same standard. (See hw09.cpp file for furtherinstructions).

Q5: RemoveStudent Function (15 points)

When removing a Student from the list, the user is prompted for the student’s name and standard. You will use these 2 string parameters to search for the Student on the list and remove them. You will need to do so in a way that ensures no memory leaks. You will notice that the Search Student function is called before this function, therefore, you are to assume that the Student that you are looking for is already on the list.(See hw09.cpp file for furtherinstructions).

Q6: Implement cin / cout for the 7 lines in main (5 points)

You will notice that main in hw09.cpp uses printf statements and getchar(). Update these statements to use cin and cout without changing the functionality of the statements.

Grading of Programming Assignment

The TA will grade your program following these steps:

(1) Compile the code. If it does not compile, 20% of the points given will be deducted. For example, if there are 20 points possible, you will earn 16 points if the program fails to compile.

(2) 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.

What to Submit?

You are required to submit your solution in a compressed format (.zip).  Make sure your compressed file is label correctly – lastname_firstname9.zip.   (All lowercase, do not put anything else in the name like “hw9”.)

The compressed file MUST contain the following:

hw09.cpp

Student.cpp

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"