Search Results for "CSCI 0046"

CSCIĀ 0046. System Programming with C

Units: 3
Prerequisite: Completion of CSCI 0012 with grade of "C" or better
Advisory: Completion of CSCI 0050 with grade of "C" or better
Hours: 72 (54 lecture, 18 laboratory)
Introduction to the C language and system programming on a Unix-like operating system. Topics include the standard C library, memory allocation, file I/O, permissions, system calls, networking, and process management. Development in a Unix environment will cover editors, shell scripting, makefiles, source code control, and debugging. (CSU, UC)

CSCI 0046 - System Programming with C

https://catalog.sierracollege.edu/course-outlines/csci-0046/
Catalog Description Prerequisite: Completion of CSCI 0012 with grade of "C" or better Advisory: Completion of CSCI 0050 with grade of "C" or better Hours: 72 (54 lecture, 18 laboratory) Description: Introduction to the C language and system programming on a Unix-like operating system. Topics include the standard C library, memory allocation, file I/O, permissions, system calls, networking, and process management. Development in a Unix environment will cover editors, shell scripting, makefiles, source code control, and debugging. (CSU, UC) Course Student Learning Outcomes CSLO #1: Use the standard C libraries for input/output, memory management, and networking. CSLO #2: Construct multi-file programs using appropriate software engineering tools. CSLO #3: Construct programs utilizing arrays, structures, loops, and/or subroutines. CSLO #4: Debug and add features to existing programs. Effective Term Fall 2026 Course Type Credit - Degree-applicable Contact Hours 72 Outside of Class Hours 90 Total Student Learning Hours 162 Course Objectives Lecture Objectives: 1. Identify the phases of compiling a C program. 2. Interpret a written program specification and decompose it into psuedocode. 3. Analyze the dependency graph for building a multi-file project. Construct a Makefile to automate the build process. 4. Describe the primitive C data types. 5. Interpret documentation of library functions and use the functions in working programs. Laboratory Objectives: Interpret written program specifications and write C programs conforming to the ANSI standard incorporating the following language and library features: 1. Standard I/O using printf, scanf, fputs, and fgets; 2. String manipulation using strcmp, arrays, and pointer arithmetic; 3. Structs and unions; 4. Multiple source and header files; 5. Stream-based and record-based file I/O; 6. Dynamic memory management; 7. Process management system calls including fork, exec, and wait, and their variants; 8. Command-line arguments; 9. Control structures: if/else, while, do/while, for; 10. Functions that accept and return primitive types, arrays, and structs; 11. Standard mathematical functions from the libm library; 12. Client socket programming; 13. Recursive functions. 14. Writing makefiles to automate the compilation process; 15. Coordinating development among two or more persons using a version control system; 16. Compiling and linking programs requiring multiple source files. General Education Information Approved College Associate Degree GE Applicability CSU GE Applicability (Recommended-requires CSU approval) Cal-GETC Applicability (Recommended - Requires External Approval) IGETC Applicability (Recommended-requires CSU/UC approval) Articulation Information CSU Transferable UC Transferable Methods of Evaluation Classroom Discussions Example: Why is fgets preferred over gets? Answer: The gets function doesn't do bounds-checking on the string array. It is possible to overrun the array by simply inputting more characters than the array allows for. The fgets functions, by contrast, is passed the length of the array and will not accept more characters than the given limit. Buffer overruns and a myriad of security vulnerabilities can be prevented by using fgets instead of gets. Objective Examinations Example: Sample test question: The following statements are executed: int x, y; x = 5; y = 8; y = ++x * y; What are the values of x and y? Answer: x = 6, y = 40 Problem Solving Examinations Example: Sample assignment: Write a recursive function to implement the quicksort algorithm. Write a driver program to accept a list of numbers from the user, sort them, and display the results to standard output. Test your function on integer arrays of size zero, one, two, and ten, and sixteen. Rubric: - Does the program accept numeric input and display correct results? - Is the function recursive? - Does the function work on inputs of size zero, one, two, ten, and sixteen? - Does the function choose a suitable pivot element? - Is the relative ordering of elements retained as they are copied around the pivot? - Is the program well-documented? - Does the program include a Makefile? - Does the program compile without warnings or errors? Projects Example: Sample assignment: Write a recursive function to implement the quicksort algorithm. Write a driver program to accept a list of numbers from the user, sort them, and display the results to standard output. Test your function on integer arrays of size zero, one, two, and ten, and sixteen. Rubric: - Does the program accept numeric input and display correct results? - Is the function recursive? - Does the function work on inputs of size zero, one, two, ten, and sixteen? - Does the function choose a suitable pivot element? - Is the relative ordering of elements retained as they are copied around the pivot? - Is the program well-documented? - Does the program include a Makefile? - Does the program compile without warnings or errors? Repeatable No Methods of Instruction Laboratory Lecture/Discussion Distance Learning Lab: Following an instructor discussion on Makefile, the students will construct a Makefile for their own assignments. Lecture: Building a multi-file project is a complex process. The instructor will lecture and present a project consisting of at least three C files, three headers files, and a library (such as libm). The project can be built "by hand" using four compilation and link commands. From this information, a dependency graph can be illustrated. This dependency graph forms the basis of constructing a Makefile -- a file that describes the sequence of events needed to build a project and automatically re-build only the affected files when changes are made. The instructor will walk the students through writing and testing a Makefile for the example project. Distance Learning In the distance learning format, the instructor prepares a video demonstration using screencasting software of writing a C program that uses the printf and scanf functions to get input from the user, do a calculation, and present the results. Students watch this video to prepare for the week's lab assignment. Example: the student writes a program to calculate the area of a circle given the diameter. Typical Out of Class Assignments Reading Assignments 1. Read the textbook chapter about the primitive data types. Pay attention to how each has a different formatting code in the printf function. Be prepared to discuss in class. 2. Read the description of the programming assignment for this week. Prepare to discuss in class how to decompose the problem into functions and what variables will be needed. Writing, Problem Solving or Performance 1. Write a recursive function to implement the quicksort algorithm. Test your function on integer arrays of size zero, one, two, and ten, and sixteen. 2. Compare and contrast the Java and C programming languages in the following areas: performance, memory usage, portability, ease of readability. Other (Term projects, research papers, portfolios, etc.) Numerous hands-on programming assignments. Required Materials C for Programmers with an Introduction to C11 Author: Deitel, Paul and Harvey Deitel Publisher: Deitel Developer Series Publication Date: 2013 Text Edition: 1st Classic Textbook?: Yes OER Link: OER: Understanding and Using C Pointers Author: Reese, Richard Publisher: O'Reilley Publication Date: 2013 Text Edition: 1st Classic Textbook?: Yes OER Link: OER: Practical System Programming with C: Pragmatic Example Applications in Linux and Unix-Based Operating Systems Author: Sri Manikanta Palakollu Publisher: Apress Publication Date: 2020 Text Edition: 1st Classic Textbook?: Yes OER Link: OER: Effective C, An Introduction to Professional C Programming Author: Robert C. Seacord Publisher: No Starch PressĀ®, Inc Publication Date: September 2024, Text Edition: 2nd Classic Textbook?: No OER Link: OER: Other materials and-or supplies required of students that contribute to the cost of the course.

CSCI 0066 - Object-Oriented Programming Using C++

https://catalog.sierracollege.edu/course-outlines/csci-0066/
Catalog Description Prerequisite: Completion of CSCI 0012 with grade of "C" or better Advisory: Completion of CSCI 0046 with grade of "C" or better Hours: 72 (54 lecture, 18 laboratory) Description: An introduction to the concepts of object-oriented programming and the application of the C++ language. Extensive programming practice using C++ as the vehicle toward modular, reusable object-oriented code. (CSU, UC) Course Student Learning Outcomes CSLO #1: Apply C++ concepts including structures, classes, methods, objects, and primitive types, referencing basic C++ libraries. CSLO #2: Use the object-oriented language concepts available in C++ to demonstrate encapsulation, abstraction, instantiation, overloading, inheritance, composition, and polymorphism. CSLO #3: Apply the object-oriented language concepts available in C++ to design and implement a program that applies to a real-world application. Effective Term Fall 2026 Course Type Credit - Degree-applicable Contact Hours 72 Outside of Class Hours 90 Total Student Learning Hours 162 Course Objectives Lecture Objectives: 1. Describe the principles and advantages of object-oriented programming. 2. Analyze a problem statement and construct appropriate classes to model the problem. 3. Describe the differences between the public, private, protected, and friend access permissions. 4. Design programs that take advantage of the modularity of object-oriented programs. 5. Evaluate and modify programs using C++. 6. Use object-oriented language concepts in software development projects including encapsulation, abstraction, instantiation, overloading, inheritance, composition, and polymorphism. 7. Incorporate file-handling techniques for data input, output, and updating using C++ methods for text and random access file organization. Laboratory Objectives: 1. Write correct C++ programs that utilize sequencing, conditionals, and loops. 2. Write correct C++ programs consisting of at least two classes. 3. Write correct C++ programs utilizing file I/O to read and write text files. 4. Write correct C++ programs utilizing arrays of primitive types and arrays of objects. 5. Write program documentation conforming to acceptable industry practices. General Education Information Approved College Associate Degree GE Applicability CSU GE Applicability (Recommended-requires CSU approval) Cal-GETC Applicability (Recommended - Requires External Approval) IGETC Applicability (Recommended-requires CSU/UC approval) Articulation Information CSU Transferable UC Transferable Methods of Evaluation Objective Examinations Example: Multiple-choice exam question: Which of the following will increment the x variable by 1? a. x++ b. ++x c. x += 1 d. x = x + 1 e. All of the above Answer: e Problem Solving Examinations Example: Design and implement a C++ class to represent the main character in a "Flappy Birds" style of video game. The class should have the following methods: void flap(); int getHeight(); boolean isCrashed(); void glide(); Projects Example: Write a program to keep track of the list of the patients for each doctor at a hospital. implement the following classes: Person, Patient, Doctor, kake sure to use the has-1 and is-a relationship. Create a list of the doctors along with the list of the patients for each doctor. Start your project by creating a UML diagram for your classes. In your UML include all the methods that is needed. Repeatable No Methods of Instruction Laboratory Lecture/Discussion Distance Learning Lab: Following an instructor discussion on C++ program, students read a written specification for a C++ program. In the hour-long lab session, students write and debug the program which includes conditional statement and classes.. The instructor circulates among the students, offering assistance and Socratically questioning student design choices. Lecture: Students have read the chapter about polymorphism before class. The instructor presents several examples of polymorphic data types. Students and instructor debate the implementation strategies, focusing on design tradeoffs. Distance Learning Students have read the chapter about polymorphism before class. In a video lecture the instructor presents several examples of polymorphic data types. instructor explains the implementation strategies, focusing on design.The instructor posts a quiz on the topic covered. The quiz relates to the reading material and the lecture and helps identify potential trouble areas in student understanding. Typical Out of Class Assignments Reading Assignments 1. Read the textbook section on "compound data types" to learn about the differences between pointers and references. Be prepared to discuss it during the lecture. 2. Locate and read online documentation for the Clang compiler. From this to determine how to invoke the compiler so that "loop unrolling" optimization is performed. Be prepared to discuss in class. Writing, Problem Solving or Performance 1. Using a Car Rental business as a guide, create a class called "Invoice" with 6 private data members: invoice number, days rented, insurance amount, rental rate, total fee, total charge. Create 3 member functions: Getdata(), Calcfee(), and ShowInvoice(). Instantiate the object in main() and call the member functions. 2. Create an overloaded minus sign "-" operator to handle a discount coupon. Prompt if there is a coupon, and the percentage discount. Use you overloaded minus operator to recalculate the customer fees. Other (Term projects, research papers, portfolios, etc.) Required Materials The C++ Programming Language Author: Stroustrup, Bjarne Publisher: Addison Wesley Publication Date: 2013 Text Edition: 4th Classic Textbook?: Yes OER Link: OER: C++ Primer Author: Lippman, Stanley, et al Publisher: Addison Wesley Publication Date: 2012 Text Edition: 5th Classic Textbook?: Yes OER Link: OER: The C++ Standard Library Author: Josuttis, Nicolai Publisher: Addison Wesley Publication Date: 2012 Text Edition: 2nd Classic Textbook?: Yes OER Link: OER: Murach's C++ programming Author: Joel Murach Publisher: Mike Murach and Associates Publication Date: 2018 Text Edition: 1st Classic Textbook?: Yes OER Link: OER: Programming: Principles and Practice Using C++ Author: Bjarne Stroustrup (Author) Publisher: Addison-Wesley Professional Publication Date: 2024 Text Edition: 3rd Classic Textbook?: OER Link: OER: Other materials and-or supplies required of students that contribute to the cost of the course.