Comp-274 Week 1 Programming Assignment

So our datacenter topology will consist of two levels of switches.

The top level are called core switches and the bottom are called edge switches.

This terminology is important to remember,

as we'll use this in some of our programing assignments.

Each core switch is connected to every edge switch and for

the first three assignments, our topology will have two core switches and

three edge switches organized just like you see here.

Connected to each edge switch are hosts.

For the first three assignments,

we'll also have two hosts attached to each edge switch.

In our data center, we'll be emulating a software-defined network,

which has a controller which connects to all switches.

And on this controller,

we'll be running an open source software controller called Ryu and we'll be

extending a program that can control the network in a centralized manner.

Switches and hosts are connected by links and

on each switch is a port for each link.

So here we can see that switch s101,

there are two links to core switches and two links to hosts.

And these ports are important in a SDN,

since it's one way we can specify forwarding behavior.

So let's take a look at how this works.

Suppose our host, h3 has IP address and our controller

program installs a rule at switch s101 that matches on h3's IP address.

The first part you see here is a match and the second part is the action.

So if a packet arrives at switch s101 from host h3, we'll look for

a matching rule in that switch.

So the switch would find its matching rule and output it or forward output one.

So the purpose of the first assignment will be to gain comfort with the set up I

just described.

So our data center will have two tenants, four hosts running iperf and

the remaining running a video streaming server and client.

We'll use the topology I just described earlier.

And in this assignment,

our edge switches will send all their traffic through switch s104.

And this naive policy is obviously not optimal since all traffic on

the network must be sent through s104, while s105 goes completely unused.

This also means that traffic from one tenant will have an observable

impact on another tenant.

And we'll see this on our video client as it experiences poor video quality.

So lets start up our mini data center and see this in action.

So first you'll want to start a terminal, and

you can use the shortcut on the desktop, or install your preferred emulator.

And we'll need two terminals for this, so you can either open two terminals,

or two tabs.

In the first terminal, we'll want to move to the directory cloudnetmooc, and

we'll start our network emulator using the following command.

And once we've seen enough of the video,

we can end the experiment by typing exit into the emulator.

You don't want to Ctrl+C this window since there's an important tear down process.

And for the controller terminal,

we can just hit Ctrl-C and ignore any of the output.

So this concludes our introduction to the Cloud networking assignments and

the walk through for the first assignment.



CS 162: Introduction to Computer Science II

Winter 2018

Credits: 4

Terms Offered: All terms

Instructor Name: Luyao Zhang

Instructor Email:

Course Description

Basic data structures; Computer programming techniques and application of software engineering principles; Introduction to analysis of programs.

Prereqs: CS 161 or EECS 161

Textbook (required)

Gaddis et al, Starting Out with C++: Early Objects, 9th Edition (ISBN-13: 978-0134400242, ISBN-10: 0134400240)


This course will be delivered via Canvas where you will interact with your classmates and with your instructor. Within the course Canvas site, you will access the learning materials, such as the syllabus, assignments and quizzes. For technical assistance, please visit Ecampus Technical Help.

Communication Policy

Please post all the course-related questions on PiazzaDiscussions forum so that the whole class may benefit from our conversation.  Please email me for matters of a personal nature.  Please include the tag [CS162 Winter 2018] in your email subject and use your OSU email instead of the Canvas email.  I will reply to course-related questions and emails within 24-48 hours. I will also send out the course updates through Canvas Announcement to the whole class and you will receive an email notification on each announcement.  It is your responsibility to check your OSU email and the Canvas course website regularly to keep updated.  For questions about assignments and grading, please contact the TA that grade your assignment.  TAs will hold office hours on WebEx from week 1 to week 10.  The schedule will be posted on Canvas.

Measurable Student Learning Outcomes

At the completion of the course, students will be able to:

  1. Design and implement programs that require:

(a) multiple classes, structures

(b) hierarchies of classes that use inheritance and polymorphism

(c) understanding of abstraction, modularity, separation of concerns, exception handling

  1. Construct and use basic linear structures (arrays, stacks, queues, and various linked lists) in programs, and be able to describe instances appropriate for their use.
  2. Classify moderately complicated algorithms in these complexity classes: O(1), O(log n), O(n), O(n log n), and O(n2).
  3. Develop test-data sets and testing plans for programming projects
  4. Producerecursive algorithms, and choose appropriately between iterative and recursive algorithms.

Graded Course Works

There will be a policies quiz at the beginning of the course, one course survey at the end of the term, and four open-book tests. Each test will have around 20 questions (T/F and multiple choices) on Canvas. You may take the test a second time, but only the score of the final attempt will count.  Each attempt will be timed.  You may not get the same questions each time.

There are 4 larger programming project assignments.  An assignment generally includes understanding the requirements, designing the program, implementing and testing the code, and   writing a reflection document. Programs are graded on how well they solve the assigned problem, meet specifications, use proper formatting and documentation. All the 4 projects will be individual work.

Labs are small development projects that reinforce the topics presented each week. You will have one lab each week, and ten labs in total.  All the labs will be individual work.

Activities include two types of activities that support the course objectives.  You will discuss certain topics on some concepts and techniques on Piazza with your classmates. There is a final reflection discussion (week 9 & 10) about your journey through 161-162 to learn how to program. This discussion will be on Canvas and will be available for about 2 week periods. There will be one group projects during the 4th-6th weeks of the term and you need to form a team to work together and submit one work.

There will be a final project instead of a final exam.  It will be similar in the format to the projects but will cover concepts from the entire course. The final project is also individual work.

Grading Policies

The list below indicates how the course learning outcomes will be measured:

  • Projects – 30%
  • Labs – 30%
  • Group activities – 10%
  • Quizzes/Test – 15%
  • Final project – 15%
  • Total – 100%
Grade letterPercentage floor

REMINDER: A passing grade for classes in CS is a C or above.  A C- in a CS course is not considered a passing grade toward a CS degree or as a prerequisite for future CS classes.   

Your grade for each assignment will be posted on Canvas (generally after one week of the due date). Canvas is used to simply record the scores. The final score displayed is only approximate.  At any time, if you want a better estimate of your current grade in the course, please email the instructor from your OSU email account.       

Re-grading: If you have a question about an assignment grade, you must contact your TA through OSU EMAIL within ONE WEEK of receiving your grade. After one week, you will not be able to dispute your grade. 

Program Re-submission: If your program does not work (could not compile on the flip, missing the makefile, etc.) the first time when TA tries to grade it, TA will send you an email and ask you to re-submit the work.  You have two days to fix the error after you receive the email and submit your work again.  In that case, you get 30% deduction on the final grade of that assignment.  If you didn’t resubmit within two days after you receive the email, you get 0. So make sure your programs can run on the flip.

Late policy:

  • The final project and quiz/test MUST be completed by the deadline, and no late submission would be accepted.
  • Projects and labs should be completed by the due date. If you do not submit the assignment by the due date, there is late penalty:
  • Late <=24 hours: 10% penalty;
  • 24 hours < Late <=48 hours: 20% penalty;
  • 48 hours < Late <=72 hours: 30% penalty;
  • Late > 72 hours: not be accepted.

Work submitted after 72 hours will not be accepted. It is your responsibility to manage your time. If there are extenuating circumstances, please contact the instructor as soon as possible before the deadline.

  • You have three bonus days in the entire term to apply to any labs/project. You can use it all at once for one assignment (if you are late for 3 days), or split it and use one day each for three assignments (no "half" day). 
  • How to apply the bonus day: leave a comment on Canvas under that assignment submission, saying that you would like to apply x bonus days for this late submission, and you have y bonus days left after that.  When TAs are applying late penalty, they will look at your submission time and your comments.  If you don't leave a comment there, TAs will directly apply the late penalty.
  • If you have a really tough situation that might affect your progress a lot (illness, job duties, family emergency...), you should contact me immediately and ask for extensions other than the 3 Bonus days.  Don't wait until the due date or even past the due date to explain your personal situations and ask for extensions.  If you are not sure whether to ask for it, better do it.

Course Work Submission

  • All work must be submitted before 23:59 (Pacific Time Zone) on the date they are due.
  • All the files need be archived in a zip file
  • Your submission must be named in the following format: assignment name + your last name + your first name for individual assignment (eg: Lab1_Jones_Adam).
  • All the projects and labs must be submitted on Canvas.
  • Programs must compile and run on the EECS server (flip) or they will not be graded. Programs must include a makefile.
  • If you are not sure you submit the correct file, download it and check it. Make sure you include everything in your submission!

Topics by Weeks





Pointers Review, Separate Compilation and Makefile

Lab 1 , Course policies quiz


Software Design, Testing and Debugging

Lab 2, Project 1,Test 1


Classes and Inheritance

Lab 3


Polymorphism and Virtual Functions

Lab 4, Project 2,Test 2



Lab 5


File I/O and Linked Lists

Lab 6, Project 3, Group Project, Test 3


ADT: Stacks and Queues

Lab 7


Complexity Analysis: Searching and Sorting

Lab 8, Project 4, Test 4


STL, Templates and Exceptions

Lab 9


Review of Recursion and Complexity

Lab 10, Final Reflections


Final Project

Academic Integrity

Programming assignments in this course are considered Take Home Programming Tests. You must do your own work, entirely.

   To Do & Not To Do:

You MAY discuss the meaning of assignments, general approaches, and strategies with other students in the course.

You MAY show your code to the TAs or instructor for feedback and help.

You MAY NOT ask another student for help debugging your assignment code.

You MAY NOT use or copy code from any other source, including the internet. You MUST write your own code for your assignments.

We use plagiarism-detection software to check your code against the code from other students. It is quite sophisticated and can easily see through variable name changes and formatting differences. If you are found in violation of any of the above policies, whether you are the giver or receiver of help, you will receive a zero on the assignment or fail the course (Instructor's decision). For further information, visit Academic or Scholarly Dishonesty, or contact the office of Student Conduct and Community Standards (SCCS) at 541-737-3656. 

Statement Regarding Students with Disabilities

Accommodations are collaborative efforts between students, faculty and Disability Access Services (DAS), with accommodations approved through DAS are responsible for contacting the faculty member in charge of the course prior to or during the first week of the term to discuss accommodations. Students who believe they are eligible for accommodations but who have not yet obtained approval through DAS should contact DAS immediately at 541-737-4098.

NOTE for Disability Access Services (DAS) – If you have accommodations through DAS for extra time on your exams or quizzes it is very important that you communicate with your instructors as soon as possible. Ask the instructor to double check all timed exams and quizzes to make sure that extra time has been given to you for each exam. The instructor has to do this for each timed exam or quiz manually

If you start an exam and do not see your extended time, please have your proctor call Ecampus Testing or try to contact your instructor for assistance. We can give you extra time while you are still taking the exam if we can be contacted before the exam submits.

The syllabus page shows a table-oriented view of the course schedule, and the basics of course grading. You can add any other comments, notes, or thoughts you have about the course structure, course policies or anything else.

To add some comments, click the "Edit" link at the top.

Course Summary:

0 Thoughts to “Comp-274 Week 1 Programming Assignment

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *