Download presentation
Presentation is loading. Please wait.
Published byCurtis Tyler Modified over 9 years ago
1
C Fundamentals CGS 3460, Lecture 5 Jan 20, 2006 Hen-I Yang
2
Previously… Software Engineering: Implementing a software that solves real problems. 3 Examples of Problem Analysis. Importance of commenting
3
Agenda Administrivia Brief Explanation of Homework C Fundamentals (Chapter 2). Brief Introduction to UNIX
4
Administrivia: Web Site & Syllabus New course web site is now up and running. The URL remains the same: http://www.cise.ufl.edu/class/cgs3460sp06 A discussion board has been setup with the new web site that allows you ask questions (so I and TAs can answer) or just have discussion with your fellow classmates. Syllabus has been updated with information with office hours, TA, course web site info, list of course topics, academic dishonesty section, UF counseling service information. Make sure you read the latest version on the web.
5
Administrivia: Emails Important Email Address to Remember: cgs3460sp06@cise.ufl.edu Email to this address for course material related questions. There will be on-duty TA to answer your question every weekday. Course administrative issues: Email your instructor directly to Hen-I Yang, hyang@cise.ufl.eduhyang@cise.ufl.edu Of course, you are always welcome to email directly to any of the TAs. But the group mailing list above will give you a better chance for better turn around time. Remember, always put [CGS3460] in the subject. Clearly indicates [DO NOT POST] to indicate private communication.
6
Administrivia: About Next Week I will be out of town to a conference for the entire next week. All my office hours are cancelled. TA Zhen Yang will be giving tutorials on UNIX, compilations, and instruction on PC version of the software you can use to implement C programs. Make sure you attend these sessions so you know how to work on your assignments. Bring a laptop to class for the tutorial sessions if you have one. Grove accounts will be handed out via email. Read “Use of Computer” section of the syllabus. Turn in your questionnaire to receive your account. Come talk to me after class today if you’re not officially registered yet.
7
Assignment 1 Familiarize yourself with UNIX. Experience the 3-step procedure of edit- compile-execute. Hands-on exercise on the materials in chapter 2 of the textbook. Handed out on 1/25, and due 2/7 at midnight. Zhen Yang will be your main contact for this first assignment.
8
More about Assignments 75% correctness, 25% readability Correctness is checked via automatic tools. Cheating detection is also checked via automatic tools. Readability is graded by TA manually, and it is possible that only part of the assignment will be selected for grading on the readability. Make sure you run on grove before you submit. You should keep a copy of the file, and do not touch it until you are certain there is no mistake on the test results and the grades. You have 2 weeks to talk to the TA in charge of that homework after you get the grade of that assignment- quiz set back. You should use only those instructions taught so far to complete each assignment.
9
Assignments: Where to Find Help? Your instructor (me) 3 TAs A total of 20 hours of office hour/week, plus additional appointments if necessary. Send email to cgs3460sp06@cise.ufl.edu for week-round Q&A.cgs3460sp06@cise.ufl.edu Discussion board and Q&A page on the course web site. Text book and material posted on the course web site.
10
I believe all of you are honest students, but unfortunately the history of this course has its share of unfortunate instances which seriously put my faith to test. You have my utmost trust and respect, but I strongly urge those who ever come across ideas of employing unfair actions in this class to reconsider. Please do not make me withdraw that trust and respect that you deserve. I am as serious as it can be when it comes to enforcing the dishonesty rules. Please go back and read the academic honesty section in the syllabus again, and read it carefully this time, as it describes in painful details regarding what are allowed from those forbidden. The Use of computer section also provides information that can help you protect yourself from being taking advantage of. There are serious and grim consequences for academic dishonesty, and I promise you that under no circumstances will I back away from the course of action described in the syllabus.
11
We have done everything we could to deter those who plan to cheat, and we will make every reasonable effort to make sure all is fair. Most important of all, you are here to learn. Cheating does not really harm me or TAs, but instead cheaters take advantages of the fellow classmates currently sitting in this very room, and cheaters are cheating oneself out of the opportunity to learn. This, to me, is injustice. This could be one of the least pleasant lectures ever, but in response to the lessons learnt from the previous offerings of this course, this matter has to be placed front and center for once, so there will be no miscommunications or misunderstandings on where the things stand. There is absolutely zero tolerance in this class for any form of dishonest behaviors. I cannot emphasize this enough before we hand out the first homework assignment next week. I will do my best within my capability to help you learn, and I am sure we’re going to have quite some fun throughout the semester.
12
Assignments: Customized questions. Different test cases. Cheating detection programs. Zero dishonesty tolerance. Strictly follow the standard procedure. First time offender (no priors in ANY COURSE): FACULTY ADJUDICATION FORM By default STUDENT JUDICIAL AFFAIRS
13
Major components of C Program Directives Comments Function (main, and others) Declarations Statements
14
#include /** * First sample program of CGS 3460, spring 2006 * Author: Hen-I Yang * Date: Jan 10, 2006 * Version: 1.0 * Note: * Revision: **/ int main() { /* Declare a variable called name to store name collected */ char *name; /* Allocate Memory to Record User’s Name Collected */ name = (char *) malloc (25); /* Collect User’s Name (Name Collect User’s Name) */ puts ("Please enter your name:"); scanf ("%20s", name); /* Print a Greeting Message (Name Screen) */ printf ("Hello, %s\n", name); return 0; } directives comments declaration main() function statement
15
Elements of C Programs Comments (/* */ or //) Directives (include, constants) Global variable declarations Main function Statements Variables Type Declaration Assignment Initialization Identifiers
16
#include #define BUFFER _ LENGTH 25 int global _ count = 0; /** * First sample program of CGS 3460, spring 2006 * Author: Hen-I Yang * Date: Jan 10, 2006 * Version: 1.0 **/ int main() { /* Declare a variable called name to store name collected */ char *name; /* Allocate Memory to Record User’s Name Collected */ name = (char *) malloc (BUFFER_LENGTH); /* Collect User’s Name (Name Collect User’s Name) */ puts ("Please enter your name:"); scanf ("%20s", name); printName(name); return 0; } Void printName(char * name) { /* Print a Greeting Message (Name Screen) */ printf ("Hello, %s\n", name); }
17
Coding Conventions Make them readable Statements can be divided over lines Space between tokens Indentation Blank Lines or remarks between logical segments Limitations in breaking up token Limitations in breaking up inside the quotation marks Using // is not a good idea
18
3 Ways to Complete Your Programming Assignments Use Telnet Edited Locally, FTP, Compiled remotely Edited and compiled locally
19
Summary New web site and syllabus available. New and clearer email policy to provide help. Tutorial sessions + Homework 1 assigned next week. Fundamentals of C. Components of C Programs Elements of C Programs
20
Before you go Make sure you finish reading Chapter 2. Try logging into grove once you receive account. Contact TA immediately if you still have not received the grove account by email before 11:59 on 1/23.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.