Week 5

What's up this week

  • Hey, it might be a good idea to look at both the slides and the videos for the week. I know this is not being done as I can see the stats on youtube. Hard to know how you are picking up this information without doing at least this.
  • I sent out some zeros on Project 3 due to copying. The great majority of students never see such an email, but it is worth revisiting some items from the syllabus on collaboration in CSE 232.

    Most students understand plagiarism with respect to writing an essay. Using that analogy: copying a sentence is like copying a line of code and copying a paragraph is like copying a whole block of code (essentially copying multiple sentences/lines of code). The result will be a zero on the program and potentially ADR (Academic Dishonesty Report, filed with the University).

    Programming projects (not labs, projects) are to be your own work , not a collaboration with others. Sharing ideas is fine, sharing code is not. Think of it this way. If you share some code with another student who is lost/confused, what is going to happen? The other student is going to put your code in their assignment. Now you two (or more) have the same code, which I assure you will show up on our check. How can I tell who gave and how took? I cannot, so you both get caught and you both get zeros.

    How do we check? Your code is structured, has to be structured since it is a program. If you change a variable name, change the spacing, move a function to a different part of a file, none of that changes what your code does which is represented by the structure. The checker looks at every program vs every other program for similarity by structure. If the structure is same, really the same such as an 80% similarity by comparison, then you have a problem and we contact you.

    Bottom line: Don't share code for a project . Don't share on a chatboard and ask for help, don't email code to another student (TAs are fine of course), for heaven's sake don't post your code on piazza etc. Sharing labs, prelabs, examples etc. is fine, even encouraged, but not on a project. More details are in the syllabus.

Readings

readings

Prelab

Please go to D2L , Login and do the prelab. It is listed on your calendar. It must be completed before midnight on Thur, 10/05.

Lab

lab5 .

This lab has no Mimir testing associated with it. If you are online (Section 730) or in Section 004 (conflict with 232 exam), it is assumed you will do this on your own time.

Project 05

Project 5 . It is due on Mimir by midnight, Oct 16th. This is because of the midterm on 10/03.

Examples

example code

Videos

More Functions

Reference Parameters
Pointer Parameters
Const Ref Parameters
Default Parameters
Overloaded Functions
Problems with matching function signatures
Template Functions

Files and Streams

Working with cin
Files

© Michigan State University 2017