1 / 15

CSCI 3328 C# Final Exam Review: Textbook, Exercises, and Self-Review

Prepare for the CSCI 3328 final exam with a comprehensive review of textbook material, self-review exercises, and quick quizzes. Topics covered include classes and objects, control statements, methods, arrays, LINQ, files and streams, and databases. Good Luck!

alanad
Download Presentation

CSCI 3328 C# Final Exam Review: Textbook, Exercises, and Self-Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCI 3328 Object Oriented Programming in C#Review: Final Exam Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539 xiang.lian@utrgv.edu

  2. Review • Textbook • Self-Review Exercises • Quick Quiz • Exercises • Time • 1:15pm ~ 3:00pm, Dec. 14 (Monday) • Place • ENGR 1.272 (classroom)

  3. Review • Lecture slides • Introduction to Classes and Objects • Control statements • Methods • *Arrays • *LINQ • *Files and Streams • *Databases and LINQ

  4. Review • Multiple Choices • True/False Statements • Programming • Write the code • Bonus Question

  5. Chapter 3: Introduction to Classes and Objects • Objects • Object-oriented design & programming • Classes • The Syntax for a Class • Variables • Methods • Properties • set and get • Events

  6. Chapter 4: Control Statements: Part 1 • The primitive data types • Arithmetic operators & Precedence • +, -, *, /, % • The components of basic control structures • The syntax of basic sequence, selection, and repetition structures in Visual C#

  7. Chapter 5: Control Statements: Part 2 • More control structures • Repetition statements • for, do … while statements • Usage of break and continue statements • Selection • switch • Logical operators

  8. Chapter 6: Methods • Declaration and call of methods • Static methods • Passing by values and references in methods • ref vs. out • Method overloading • Method signature • Basic classes/functions • Math • Math.Sqrt(x), Math.Floor(x), Math.Ceiling(x), … • Math.PI, Math.E • Random • How to generate random numbers • Next function

  9. Chapter 7: Arrays • Declaration and usage of arrays • Index • Length • Initialization and reference to elements of the array • Initializer list • Passing arrays to methods • By reference and by value • Usage of the foreach statement to iterate through elements in the array

  10. Chapter 7: Arrays (cont'd) • Sorting data in arrays • Array.Sort(arrayName) • Search • Linear search • Binary search • int index = Array.BinarySearch(array, value); • Copying an array • Array.Copy(fromArray, fromIndex, toArray, to Index, length); • The declaration and usage of rectangular arrays • Index • int [,] array = new int [4, 6];

  11. Chapter 8: Introduction to LINQ and Collections • Write filtering statements using LINQ • The usage of LINQ to query an array • Sort an array using LINQ • ascending (default) • descending • Manipulate collections (e.g., List) by LINQ • Functions: • Distinct() • Any()

  12. Chapter 11: Files and Streams • Data Hierarchy • Bits  Characters  Fields  Records  Files  Databases • Create a File • StreamReader fileReader = newStreamReader(fileName); • StreamWriter fileWriter = newStreamWriter(fileName); • Read a File • string inputRecord = fileReader.ReadLine(); • Write a File • fileWriter.WriteLine("text"); • Close a File • fileReader.Close(); • fileWriter.Close();

  13. Chapter 12:Databases and LINQ • Create a connection between data source and controls • Display the results of the LINQ query • How to update the database via controls

  14. Good Luck! Q/A

More Related