CS 135 ~ Computer Science I

Course Description

This course is intended for students in computer science or engineering majors. It covers: a) Program development in a complex operating environment; b) Problem-solving methods and algorithm development in a high-level programming language; c) Program design, coding, debugging, and documentation using techniques of a good programming style.

Prerequisite: A grade of C or better in either MATH 127 or MATH 128; or MATH 181 or SAT score of 630 or higher or ACT Math score of 28 or higher.

This course can only be completed on the following platforms: Windows, Mac, Linux.

This Syllabus is subject to change as deemed appropriate
by the instructor with advance notification.

Meeting Times
Section(s): 1003, 1004, 1005:
web remote 6p - 9:50p We
Length: 16 Weeks
18 Jan 2022 -- 15 May 2022
Weekly Contact Hours  (for on-campus sections):
  • 4 total
  • 3 Hours Lecture
  • 1 Hour Lab
Weekly Study Hours:
  • On-campus courses
  • 4 hours minimum
  • Off-campus courses
  • 8 hours minimum

You must be registered to take this class.

Instructor Information

Professor: Dr. David Brodersen
Office Location: Henderson C201D
Office Hours:
  • Virtually, using Canvas BBB and Discord
  • Monday -- Thursday, 2 pm - 3:30 pm Pacific
  • Appointments are not limited to the above times
Phone: 702-651-3151
CSN email:
I will reply to emails sent using Canvas email or to my CSN email address, above, within 72 hours. Sometimes Canvas Email doesn't work. If you do not receive a reply within 72 hours, please resend your email to the address above using your student email account. I do not read emails during the weekend. Please use your CSN email address for official communications and make sure to include your name, class, and section number.

Late Instructor Policy: When meeting synchronously (classroom or web-remote), students must wait for 15 minutes if the instructor is late. The class is excused if the instructor is delayed beyond 15 minutes. Check Canvas for updates. The same is true if students are late. If a class is scheduled to meet at 6:00 pm, I will wait until 6:15 pm. If no students show up for the virtual or class meeting by 15 minutes after the start time, I'll close the meeting.


The learning outcomes

By the end of the semester, students who earn a grade of C or better will be able to:


The textbook

C++ Programming: From Problem Analysis to Program Design, 8th Edition.
malik, d.s.
Cengage, 2017.
ISBN-13: 978-1-33710-208-7.
purchase new or used, physical or electronic.

The Linux Command Line: A Complete Introduction.
Shotts, William E. Jr.
No Starch Press. 2012.
ISBN-13: 978-1-59327-389-7. (download link is available in Canvas)

The Shotts Lab Supplement: A Companion to Shotts.
Brodersen, David
No Press. 2022.
ISBN-13: none.
(download link is available in Canvas)

The software

This course can only be completed on the following platforms: Windows, Mac, Linux.

CSN provides computer labs with any needed software for you to complete your work. However, most students prefer to do their work from home. You may also access the department's Linux server remotely, e.g., from your home.

Most of the software used in the course will be applications that you already have on your computer, such as the Chrome Browser. Below you will find the three major areas that either utilize existing software on your systems or require that you install additional software.

Canvas LMS

This class makes use of Canvas, CSN's Learning Management System (LMS). You can access Canvas via the link: using most modern Web browsers. Once you are in Canvas, the verticle blue bar on the left is known as the global navigation menu because it allows you to access areas outside of your course. Just to the right of the global navigation menu is the course navigation links, which provide you with access to the various areas in the course.


Discord is an online application for messaging and audio/video communication. If you go to, you can view all the information you need for setting up and using discord, which includes downloading discord apps to your desktop and/or mobile devices. We will make extensive use of Discord this semester to provide academic support for software students, such as tutoring or obtaining answers to questions. The invitation link to join our server is This link will take you to the #course-request channel. Post your

You should be granted access within 24 hours. If you have any problems with the link to join the server, please let me know.

The Bellagio Server

The Bellagio server is a computer on campus designed to process requests and deliver data to other computers over the internet or a local network. We will be using Bellagio to develop and compile our programs so that they can be executed on the server. Utilities on Bellagio are available to check the spelling in our code, make sure that your code is formatted correctly, and make it possible for you to submit your homework assignments for grading.

You will receive login credentials to access the CIT Department's Linux server that has all the tools needed for this course. Any assignments where you have to write C++ code will be submitted using this server. Look for an email at your CSN email address with your login information. The server will use your CSN email address for system messages pertinent to your account. Therefore it is best to maintain and regularly check your CSN email and Canvas account! If you do not yet have a CSN email account, go to to set up your account.

The latest edition of the CIT Linux Server Lab Manual is available online if you go to the Canvas Home Page for this course and pick the Bellagio Server Button.

If you plan to work on campus, the CSN computer labs each have specific pods of computers that have the MobaXterm software installed. Ask a lab monitor to direct you to the correct pod. You may also use any of the Apple iMac computers.

You are responsible for the reliability and speed of your internet connection when off-campus.

I'm sorry, but college policy prohibits me from installing software on your computer.

Note: You may use any operating system, compiler, or integrated development environment of your choosing while developing your program. However, your programs must compile and execute correctly on the department's Linux server to receive credit.

When grading assignments, I compile all programs using the following command:

It is advisable that you: Compile your programs one last time just before submission to make sure your program works and that you are sending me the right file. Students have handed in a previous revision of their code by accident, which cost them points on the assignment. The goal is to write code that compiles without warning or error messages. Once the deadline for your code has passed, I will not accept any submissions for the assignment even if you sent me the wrong file or revision.

The Schedule, assignments, and grading


Week Number Week Beginning Planned Activity
01 Jan 17 (Monday Off) Introduction, Syllabus, Discord,
Beginning Linux Course
02 Jan 24 Linux Account, Linux Exercise
Malik Ch 1 - Overview
03 Jan 31 Malik Ch 2 - Basic Elements of C++
04 Feb 07 Makik Ch 2 (Cont)
05 Feb 14 Malik Ch 3 - Input/Output
06 Feb 21 (Monday Off) Malik Ch 4 - Selection
07 Feb 28 Malik Ch 5 - Repetition
08 Mar 07 Malik Ch 5 (cont)
09 Mar 14 Midterm Exam
10 Mar 21 Malik Ch 6 - User-defined Functions
11 Mar 28 Malik Ch 6 (cont)
12 Apr 04 Malik Ch 7 - std::string data type
13 *** Apr 11 *** Spring Break
14 Apr 18 Malik Ch 8 - Arrays and Strings
15 Apr 25 Malik Ch 9 - Structures
16 May 02 Malik Ch 9 (cont)
17 May 09 Final Exam
This schedule is tentative and subject to change as deemed appropriate by the instructor with advanced notification. Notification will be provided in class or in canvas.



Important Dates
Important Dates:

Date Event
Jan 17 College Closed, Martin Luther King, Jr. Day
Jan 18 First Day of Instruction for 16-Week Session
Jan 24 Last Day for 100% Refund for 16-Week Session
Last Day to Register by 11:59 P.M. for 16-Week Session
Jan 31 Last Day for 50% Refund for 16-Week Session
Last Day to Drop a class WITHOUT a grade of W for 16-Week Session
Feb 21 Labor Day Holiday (No Classes -- CSN closed)
Mar 04 Last Day to Apply for Spring 2022 Graduation
Mar 25 Last Day to Drop a class WITH a grade of W for 16-Week Session
Last Day to Change from Credit to Audit for 16-Week Session
*** Apr 11 *** Spring Break: April 11 - 17
May 09 Final Exam Week: Due Date is posted in Canvas
May 15 Last Day of Instruction for 16-Week Session
May 18 Grades are Due from Instructors for 16-Week Session


All Assignments are scheduled in Canvas. As a general rule, I schedule one quiz, lab, and programming assignment for each chapter. However, some chapters require that I schedule two assignments to avoid making assignments too complicated. Due dates are posted in canvas and are strictly enforced

Please note: I do not accept late assignments, nor do I provide makeup assignments. It is best to work ahead if you know you are going to have conflicts or time constraints.

Exams are scheduled, but you can expect some unannounced quizzes. If I feel that students are not "getting it," I may add an additional assignment to foster understanding.


If they are available, I will be using TAs to grade your work. The standard used for grading an assignment is called a grading rubric. Complete details on the grading rubric can be accessed by picking the Grading Rubric button on the Canvas Home Page for this course.

How Grades are Determined

I calculate an overall score based on your performance on homework assignments, labs, and assessments. Assessments are scheduled with specific due dates/times. The following weights are applied to determine your course grade:

Metric Weight
Programming assignments 30%
Labs 10%
Quizzes 10%
Midterm Exam 25%
Final Exam 25%
To pass the course with a grade of C or better, you must have a lab score of 70% or better and take both the midterm and final

The Grading Scale

The following scale is used to determine your final grade from the percentage earned in this course.

Letter Grade Overall Score
A 100 to 94%
A- < 94 to 90%
B+ < 90 to 87%
B < 87 to 84%
B- < 84 to 80%
c+ < 80 to 77%
C < 77 to 74%
C- < 74 to 70%
D+ < 70 to 67%
D < 67 to 64%
D- < 64 to 60%
F < 60%
I reserve the right to adjust your final grade up/down based on your attendance, participation, and effort.

Withdrawal Policy

Instructors do not have the option of withdrawing students from a course. The official withdrawal date is available in the calendar for the current semester on the CSN Online Calendar.

You are strongly encouraged to discuss your decisions with an academic counselor, academic adviser or success coach AND Student Financial Services, because these decisions may affect your financial aid and Satisfactory Academic Progress. Students receiving financial aid may find their awards reduced.

If you wish to receive a W in lieu of a grade, you MUST withdraw yourself officially from the class. Once you have withdrawn (dropped), you must discontinue attending class. Alternatively, you may wish to change from Credit to Audit and continue to attend the class.

You will need to complete the Auditing Classes Form if you wish to change to audit. Instructions for submitting the form are included in the instructions at the top of the form.


Attendance and participation are mandatory.

Additional information unique to the class or instructor

  1. We are all adults. You can expect me to treat you with courtesy and respect, and I expect the same from you when interacting with your classmates or me.
  2. I like to encourage a casual and friendly atmosphere. In that spirit, feel free to call me David or Dave. A suitable alternative is "Dr. Dave."
  3. I tend to get a little grumpy when I catch students cheating because of the frustration of watching someone do damage to their future employment success.

CSN Standard Syllabus Statements

Important note

If you have any concerns about this course and/or me, please contact me first. Give me at least 72 hours to respond. If I cannot resolve your issue, you are welcome to contact CIT Department Office at 702-651-5976. You will be directed to the appropriate Program Director or the Department Chair who will first ask you if you contacted me and gave me time to respond to your concerns. You will remain anonymous, if possible, and all communications will be strictly confidential. Please DO NOT wait until the last minute to make your concerns known to me and/or to the CIT Department. I have been teaching for nearly 40 years and have had much practice addressing concerns both for myself and other instructors. It is very rare that I am unable to effectively address a concern to the satisfaction of a student.

CIT software lab

The software lab will be virtual and will be available on January 19, 2021. For location/date/time information, please visit Click on Networking and Software Lab Hours.

Counseling & Retention Services

Counselors assist students who are on academic warning/probation/suspension and financial aid warning/suspension. Counselors prepare academic suspension and financial aid appeals. Counselors help students who are having academic challenges and also those who have been referred by their instructors through the MyCoyotePLAN Early Alert program. Counselors connect students to college and community resources and help them evaluate their options to make informed decisions. For more information about Counseling & Retention Services, please visit:


Safari Tech Books Online, available through the library, offers an excellent source of supplemental resources that you may use for this course.

To find Safari Tech Books Online, go to the library's Web site at: Click the Databases button. In the A-Z Databases page that appears, click S to filter. The link to Safari Tech Books Online should be at or near the top of the list.

Initially, you will have to enter your CSN student email address, then create an account with Safari Tech Books Online. Subsequently, you will use your email address and your Safari password to access the Safari resources.

Required extra- or co-curricular activities

All activities are based on projects and exams assigned throughout the course. Any required extra activities will be clearly explained in class.


This class does not have an experiment lab and therefore we will not be concerned about following specific safety strategies.

Additional fees

There are no additional fees for this course.

Excess credit fee information

Please visit for information about the excess credit fee applied in certain circumstances.

Title IX resources

More information is available at

Objectionable materials

Instructors have the responsibility to set and maintain standards of classroom behavior appropriate to the discipline and method of instruction. No objectionable materials or language will be used during this class. This includes all possible modes of the class: online and in person. The instructor will make the final determination regarding any objectionable materials or language. Students may not engage in activities the instructor deems disruptive or counterproductive to the goals of the class. Instructors have the right to remove offending students from class.

Academic integrity

You are expected to complete your own work in this class. Cheating on exams or lab exercises is not fair to students who are studying honestly. Cheating is also subject to penalties, which can include getting a zero for the assignment or failing the course. The full list of possible penalties is listed in the CSN Student Academic Integrity Policy. Please make yourself familiar with this policy (

Stay out of trouble by following these rules:

Rule 1: You must not look at solutions or program codes that are not your own.

It is an act of plagiarism to submit work that is copied or derived from the work of others and submitted as your own. For example, using a solution from the Internet or a solution from another student (past or present) or some other source, in part or in whole, that is not your own work is a violation of the Academic Integrity Policy. Many infractions I see make use of solution code found online. The best way to steer clear of this possibility is not to search for online solutions to the programming assignments. Moreover, looking at someone else's solution code in order to determine how to solve the problem yourself is also an infraction of the Academic Integrity Policy. In essence, you should not be looking at someone else's code in order to solve the problems in this class. This is not an appropriate way to "check your work," "get a hint," or "see alternative approaches."

Rule 2: You must not share your solution code with other students.

In particular, you should not ask anyone to give you a copy of their code or, conversely, give your code to another student who asks you for it. Similarly, you should not discuss your algorithmic strategies to such an extent that you and your collaborators end up turning in the same code. Moreover, you are expected to take reasonable measures to maintain the privacy of your solutions. For example, you should not leave copies of your work on public computers nor post your solution code on websites.

Rule 3: You must indicate on your submission any assistance you received.

If you received aid while producing your solution, you should indicate from whom you got help and what help you received. A proper citation should specifically identify the source (e.g., person's name, book title, website URL, etc.) and a clear indication of how this assistance influenced your work (be as specific as possible). For example, you might write "I discussed the approach used for sorting numbers in the sort\_numbers function with TA Mary Smith." If you make use of such assistance without giving proper credit, you may be guilty of plagiarism.

It is also important to make sure that the assistance you receive consists of general advice that does not include having someone else write the actual code or show you their code. It is fine to discuss ideas and strategies, but you should be careful to write your programs on your own, as indicated in Rules 1 and 2.

I have no desire to create a climate in which students feel as if they are under suspicion. A key point of the Academic Integrity Policy is that we all benefit from working in an atmosphere of mutual trust. Students who deliberately take advantage of that trust will poison that atmosphere for everyone. I only ask that you be upfront and transparent. If you use a Web resource**, just cite the exact source(s). This becomes part of the formal documentation for your program and a ready reference for yourself in the future:

Just be transparent, please. Sneaky behavior destroys trust really quickly.


Incident | Penalty
First: You will receive a zero on the assignment, and I will reduce your final course grade by one full letter grade (e.g., if you would have earned a B+, I will assign a C+ instead).
Second: You will receive a failing grade for the course. The class cannot be dropped to avoid a failing grade.

Disability Resource Center (DRC)

The College of Southern Nevada is committed to making physical facilities and instructional programs accessible to students with disabilities. If you have a disability that may have some impact on your work in this class and for which you may require accommodations, please visit the Disability Resource Center (DRC) so that such accommodations can be considered. All discussions will remain confidential. The Disability Resource Center (DRC) has offices at all three campus locations as the focal point for the coordination of services for students with disabilities. If you have a physical, emotional, or mental disability that “substantially limits one or more major life activities (including walking, seeing, hearing, speaking, breathing, learning and working),” and will require accommodation in this class, please contact the DRC at WC (702) 651-5644, or email at at NLV (702) 651-4045, or email at and at HNC (702) 651-3795, or email at For Deaf and Hard of Hearing Services contact (702) 651- 4448, or email at Students that receive accommodation letters, please meet with me to discuss the provisions of those accommodations as soon as possible.

Counseling and Psychological Services (CAPS)

The Counseling and Psychological Services (CAPS offers short-term, problem-focused counseling to CSN students who may feel overwhelmed by the responsibilities of college, work, family, and relationships. Clinicians are available to help students cope with stresses and personal issues that may interfere with their ability to perform in school. The service is provided confidentially and free to currently enrolled students. To schedule an appointment, please call CAPS at WC (702) 651-5518, at NLV (702) 651-4099, and at HN (702) 651-3099.

Food and Housing Insecurity Support

Any student who has difficulty affording groceries or accessing sufficient food to eat every day, or who lacks a safe and stable place to live, and believes this may affect their performance in the course, is urged to contact Counseling & Psychological Services (CAPS), for a list of resources and support.

Student rights & responsibilities

When you choose to become a student at CSN, you accept the rights and responsibilities of membership in CSN’s academic and social community. You can find policies covering students such as the Student Conduct, Students’ Right to Know, Students’ Academic Integrity, and Disruptive and Abusive Student in the following locations:

CSN Libraries

CSN Libraries provides support for students completing assignments that require research and the use of information. Librarians are available to students for one-on-one assistance locating and citing quality information either online ( or at one of our campus libraries. Find more information on our website (

Public health directives (COVID-19)

Students must follow all active CSN public health directives while enrolled in this class. Properly worn face coverings are mandatory for all faculty and students in the classroom as well as on campus. CSN public health directives are found at Students who do not comply with these directives will be asked to leave the classroom. Refusal to follow the guidelines may result in further disciplinary action according to the CSN Student Conduct Code, including being dropped from the course.

Recording class

You are welcome to record this class.

Centers for Academic Success (CAS)

Centers for Academic Success (CAS) provides quality DROP-IN academic assistance to all students enrolled in for-credit courses at CSN. Tutors are available for most general education courses and some historically challenging courses, such as computer programming courses, math, physics, and chemistry. Academic learning support includes assistance with learning strategies, Canvas, Smarthinking online tutoring, Microsoft Office, reading, writing, oral presentations, math, and science. CAS tutors also provide support to study groups and assistance for placement test preparation. CAS is open Monday through Sunday to be more accessible to all students. Hours for all locations are Monday – Thursday 9:00 am to 6:00 pm and Friday – Sunday 11:00 am to 4:00 pm. You may visit for more details about online and in-person services. You may also contact us at one of our offices: Charleston Centers 702–651–5732, North Las Vegas Learning Commons 702–651–4232, Henderson Learning Commons 702–651–3125.

Early Alert Referral Program

A referral program to connect students with college resources when assistance is needed to achieve success. Referrals may be initiated by faculty and staff as well by students through MyCoyotePLAN. After a referral is submitted, students will receive an email notification and will be contacted by the department to which they were referred to offer assistance.


Information contained in this syllabus is subject to change with notice. I will make an announcement of any change in class and in the college's learning management system for this course. Please be sure to read class announcements in the learning management system every time you log in. It is your responsibility to stay informed!

C++ General Programming Requirements

The general programming assignment requirements differ from the examples provided in the text. Your submissions must follow the guidelines presented below. That is, the coding standards presented below and specified in your assignments take precedence over all other sources that specify code format and styling.

  1. Limit your code to C++ commands that were presented in and before the current chapter of the text, labs, or lectures.

  2. For each lab assignment, you are welcome to work with another student as long as you include his / her name in the header comment as an author. If you do work with another student you must heavily comment your code to make sure that I know you understand the commands.

  3. For each programming assignment, you must work individually unless instructed otherwise. You may discuss the problem with classmates, but at no time should you discuss code in any form. You may not show another student your code, share your file with another student, look at another student's code, or tell another student what to type. Evidence of academic dishonesty will result in a score of zero for all the students involved. If you're unsure about what you can share while working on an assignment, be sure and ask.

  4. Your program must follow the problem statement requirements in the assignment as well as the coding standards below. You will lose points for failing to follow the standards.

    1. A header comment must be included at the top of each submitted file. Submissions without this header comment will receive a grade of zero. Copy the header comment found in and paste it at beginning of every assignment you create. The header comment consists of the following information. Include any documentation annotations (annotations begin with the character @):

      • Failure to disclose assistance, regardless of source, may be interpreted as academic dishonesty.
    2. Basic blocks:

      1. Blocks will always use braces as demonstrated in class.
      2. Statements in the block should be indented consistent with logical nesting. Use 4 spaces per indent level. Never use tabs in source code or output.


    3. Variables:

      1. Use descriptive names for variables with naming standards discussed in class.
      2. Reduce the scope of variables so that they are only visible in the scope where they're used. Global variables are never permitted; global constants are permitted, when appropriate.
      3. Use one line of code for each variable declaration. Although the textbook provides examples of declaring multiple variables in one line, it is not permitted in the assignments because doing so limits one's ability to document the purpose of the variable.
      4. Variable declarations must appear at the beginning of the block of code in which they're used.
      5. Document the purpose of every identifier you create (e.g., constants, variables, functions, etc.).
      6. Variable declarations should appear at the beginning of the block of code in which they're used. Do not intermix declarations with code.
    4. Statements:

      1. No more than one statement may be written on a single line.
      2. The following may not be used: 'continue', 'goto', and 'break' not in a switch structure.
      3. The use of 'exit' should be reserved for unrecoverable errors only (e.g., failed memory allocation). Handle errors graciously wherever possible. CS 135 students should not use this command.
      4. Lines of code should be no more than 80 characters long.
      5. Diagnostic/debug print statements should be disabled or deleted in the final submission. In advanced courses, feel free to use conditional compilation to enable/disable debugging statements.
    5. Functions:

      1. Use descriptive names for functions using naming standards discussed in class.

      2. All functions must be documented with the following information:

        1. Purpose - A statement or a set of statements that describes the purpose of the function.
        2. Parameter(s) - The purpose of each parameter should be described.
        3. Return value - For value-returning functions only, describe what the function returns.
        4. When using a single source code file, function documentation should be placed in comments directly above the function definition, not the prototype.
        5. When implementing a large project with multiple source code files, function documentation should be placed in comments directly above the function prototypes in the interface file, not in the implementation file.

        Here is an example of a function documentation header:

      3. Function bodies should not be of extended length when easily separated into multiple functions (i.e., functions should do one thing and nothing more).

      4. Non-recursive functions should contain exactly one return statement. Functions should have one entry point and one exit point (i.e., non-recursive functions should have no more than one return statement).

  5. Programs must be submitted on time. Late programs or programs that do not compile or run will receive no points. Your program must compile cleanly (i.e., no warnings) and execute properly on the Bellagio server for credit. In CS 135 there are some programs where warnings cannot be avoided while compiling programs. However, there won't be many. Excessive warnings are an indication that your program has problems.

    It is better to submit a partially correct program that compiles than no program at all.

  6. Submit the program file(s) electronically using the procedure shown in the assignment. You may submit your program file(s) as many times as you want before the deadline. Each submission will replace any earlier submission. I can only see and grade your most recent submission. Be careful to submit the correct file. You will not get credit for your work if you accidentally submit the wrong file. Be sure to submit all required files with each submission. You cannot submit any work after the deadline has expired.

Grading Rubric

Check your general assignment limitations:

Did you limit your code to C++ commands that were presented in and before the current chapter of the text, labs, or lectures?

Did you limit your use of the 'break' command to switch structures only?

Did you use the 'continue' statement? (hopefully not)

Did you use the 'goto' statement? (hopefully not)

Did you use the 'exit' statement? (hopefully not)

Check your Documentation:

Does your code have a properly completed header comment?

Did you cite any sources of code that wasn't your own in the comments?

Did you include the names of anyone who helped you, besides your instructor in the comments?

Did you add comments to your code that describe why the code was included in your program?

Check your Code Blocks:

Did you remember to indent each new code block using 4-spaces?

Did you make sure there are no TAB characters in your code?

Do all your blocks have curly braces around them regardless of the number of lines of code in the block?

Check your Variables:

Did you use descriptive names for variables using naming standards discussed in class?

Did you make sure you don't have any global variables?

Did you reduce the scope of your variables so that they are only visable in the scope where they are used?

Are each of the variables declared on their own line?

Did you declare your variables at the beginning of the block of code in which they're used?

Did you provide a comment for each variable that describes its use?

Chect your Statements:

Do you have more than one statement on a single line?

Did you make sure not to use continue, goto, break (unless it's in a switch structure)?

Did you make sure not to use exit?

Did you limit your lines of code to 80 characters?

Did you disable or delete any code that you used to debug your program?

Check your Functions:

Did you use descriptive names for functions using naming standards discussed in class.

Did you place a function documentation header above each function implementation that included the purpose, parameters, what value returning functions were retruning? (Note: large projects need the comments above the function prototypes in the interface files.)

Are your functions small and do they perform a single basic task?

Do your value returning functions have only one return statement and is it at the end of the function.

Check your Submission procedure:

Is your program correctly named?

Does your program compile on the Bellagio Server with no warnings?

Does your program run exactly as specified?

Does your program exactly match the sample output provided in the assignment?

Did you use the correct Linux command with the correct options and arguments to submit your program?


Criteria Ratings Pts
Program Specifications / Correctness 40 pts
32 pts
Above Average
24 pts
16 pts
Below Average
0 pts
Not Met
40 pts
Readability 20 pts
16 pts
Above Average
12 pts
8 pts
Below Average
0 pts
Not Met
20 pts
Documentation 20 pts
16 pts
Above Average
12 pts
8 pts
Below Average
0 pts
Not Met
20 pts
Code Efficiency 10 pts
8 pts
Above Average
6 pts
4 pts
Below Average
0 pts
Not Met
10 pts
Miscellaneous 10 pts
8 pts
Above Average
6 pts
4 pts
Below Average
0 pts
Not Met
10 pts
Total Points: 100 pts
Documentation: Failing to document your code can result in a 0 for the assignment.
Use of the following commands can result in a 0 for the assignment: 'exit', 'continue', 'goto', and 'break'
(the use of 'break' is allowed only in a switch structure.)

Program Specifications / Correctness

This is the most important criterion. A program must meet its specifications (whether from a textbook problem or as written in the assignment) and function correctly. This means that it behaves as desired, producing the correct output for a variety of inputs. (In the beginning, I will be lenient with regards to producing correct output for all inputs, as we may not always have the tools needed to accomplish that, yet.) This criterion includes the need to meet specifications by writing a program in a particular way or using a particular language feature, if such a thing is specified in the problem.

If a specification is ambiguous or unclear, you have two choices: You can either make a reasonable assumption about what is required, based on what makes the most sense to you, or you can ask the instructor. If you make an assumption about an ambiguous specification, you should mention that somewhere in a comment so that the reader/grader knows what you were thinking. Points may be taken off for poor assumptions, however.


Code needs to be readable to both you and a knowledgeable third party. This involves: Using indentation consistently (e.g.., every function’s body is indented to the same level)

Adding whitespace (blank lines, spaces) where appropriate to help separate distinct parts of the code (e.g.., space after commas in lists, blank lines between functions or between blocks of related lines within functions, etc.) Giving variables meaningful names. Variables named a, b, and c or foo, bar, and baz give the reader no information whatsoever about their purpose or what information they may hold. Names like principal, maximum, and counter are much more useful. Loop variables are a common exception to this idea, and loop variables named i, j, etc. are okay. The code should be well organized. Once we have learned about functions, code should be organized into functions so that blocks of code that need to be reused are contained within functions to enable that, and functions should have meaningful names. This is a concept that we will be learning about as we write more code, and so few points, if any, will be taken off for organization issues that we have not yet addressed.


Documentation standards can be found at

Every file containing code should start with a header comment:

At the very least, this header should contain the information above. Other details you might include are a more detailed description of the approach used in the code if it is complex or may be misunderstood, or references to resources that you used to help you write it.

All code should also be well-commented. This requires striking a balance between commenting everything, which adds a great deal of unneeded noise to the code, and commenting nothing, in which case the reader of the code (or you, when you come back to it later) has no assistance in understanding the more complex or less obvious sections of code. In general, aim to put a comment on any line of code that you might not understand yourself if you came back to it in a month without having thought about it in the interim. Like code organization, appropriate commenting is also something we will be learning about as we write code throughout the semester, so while corrections may be made, points will only be taken off for things that have been emphasized in class already.

From time-to-time I may ask you to heavily comment your code as part of the assignment. In those cases, you should include more comments than usual that describe why the code is needed to meet assignment specifications.

Code Efficiency

There are often many ways to write a program that meets a particular specification, and several of them are often poor choices. Although you are not expected to write programs that are stellar in terms of efficiency, you are expected to implement the methods discussed in your text. Poor coding choices are indicated by many more lines of code (and thus your effort and time) than needed, or taking much more of the computer's time to execute than needed. For example, a certain section of code can be executed ten times by copying and pasting it ten times in a row rather than putting it in a simple for loop. The latter is far superior and greatly preferred because it is easier to write and maintain.

However, trying to make your code more efficient, does not give you license to implement advanced commands. Keep your attempts to code more efficiently to using commands that have been covered in the labs, lectures, or chapters covered at the moment.

Assignment Specifications

Assignments will usually contain specifications and/or requirements outside of the programming problems themselves, such as:



Note: The page you are viewing
is not sanctioned by CSN.