vissza a tantárgylistához   nyomtatható verzió    

    Basics of Programming 1

    A tantárgy neve magyarul / Name of the subject in Hungarian: A programozás alapjai 1

    Last updated: 2022. augusztus 24.

    Budapest University of Technology and Economics
    Faculty of Electrical Engineering and Informatics

    Software Engineering
    Bsc Course

    Course ID Semester Assessment Credit Tantárgyfélév
    VIEEAA00 1 2/2/2/f 7  
    3. Course coordinator and department Kohári Zsolt,
    Web page of the course http://www.eet.bme.hu/vieeaa00/en
    4. Instructors

    Name:

    Position:

    Department:

    Dr. Márton Németh

    Research Fellow

    D. of Electron Devices

    5. Required knowledge -
    6. Pre-requisites
    Kötelező:
    NEM
    (TárgyEredmény("BMEVIEEA100", "jegy", _) >= 2
    VAGY
    TárgyEredmény("BMEVIEEA100", "felvétel", AktualisFelev()) > 0
    VAGY
    TárgyEredmény("BMEVIEEA101", "jegy", _) >= 2
    VAGY
    TárgyEredmény("BMEVIEEA101", "felvétel", AktualisFelev()) > 0)

    ÉS (Training.Code=("5N-A8") VAGY Training.Code=("5NAA8"))

    A fenti forma a Neptun sajátja, ezen technikai okokból nem változtattunk.

    A kötelező előtanulmányi rend az adott szak honlapján és képzési programjában található.

    Ajánlott:
    -
    7. Objectives, learning outcomes and obtained knowledge

    The objective of the course is to provide students with a skill level in the use of computer problem solving methods and basic tools such as elementary and complex data, linear data structures, memory management. They should also be able to apply the knowledge and skills acquired effectively in their further studies.

    This objective will be achieved by learning a high-level programming language, C. Students will be able to:

    (K3) apply the tools described for imperative programming,

    (K3) construct static and dynamic linear data structures in his/her program, apply basic algorithms and elementary programming theorems to them,

    (K3) use C programming language and integrated development environment to implement programs using the above tools,

    (K2) make elementary considerations about the resource requirements of a program,

    (K2) understand specifications and programming documentation,

    (K2) explain the operation and applications of higher level abstractions and non-linear data structures in the topic.

    8. Synopsis

    1st week.

    Introduction: Concepts of Programming. Expressions and variables, the type concept. C Language Reference. Simple expressions in the program.

    Practice: Everyday algorithms. Create a flowchart-like diagram of well known algorithms (e.g., written addition, subtraction, prime factorization using pen and paper).

    Laboratory: Introduction to the computer lab, to the system, and to the structure of the university network. Operating System basics: command line program can be started from the command line, its parameters.

     

    2nd week.

    Lecture: Elements of the Source Code. Algorithm: definition and description. Cycle (loop), branching, sequence. Combination of these. Complex control structures, complex expressions. Computer hardware overview.

    Practice: Exercise algorithms with a deck of cards as an example. Find a given card. Which is the lowest/highest? How can I sort?

    Laboratory: Introduction of an Integrated Development Environment. Compilation of simple programs. Basics of debugging, monitoring the assignment to variables. Editing the program source and compilation. The compiler error messages.

     

    3rd week.

    Lecture: Pseudo code / C versions of simple algorithms. Theorems of Summation and Search of extremum. Simple types. Character and logical types. Arrays.

    Practice: Algorithms in C language description. Examples from Number theory. Quadratic equation. Numerical methods, e.g. calculation of pi using loops. Several versions of 'is this a prime number'. Palindrome numbers.

    Laboratory: Coding simple algorithms from a Pseudo code / structogram representation. Programs with simple I/O. printf, scanf, format strings.

     

    4th week.

    Lecture: Built-in types in details. Finite numerical representation. Integer and floating-point representation of numbers, limits. Concept of functions and their use. Abstraction, function arguments, local variables.

    Practice: Exercise tasks that can be solved using arrays. Calendar, leap years. The sieve of Eratosthenes.

    Laboratory: Exercise simple algorithms. Nested loops. Multiplication table, 'draw' a rectangle. Programming of known algorithms (eg, prime, gcd). Find my Number (guess, smaller, bigger).

     

    5th week.

    Lecture: Operators: precedence, evaluation, side effects. Compound data, structures, defining user types.

    Practice: Complex problems, decomposition. Functions, parameters and return values. Writing simple math-like functions. My toupper, Caesar encryption.

    Laboratory: The basics of array handling. Creating arrays. Search, count the number of pairs in it, etc.. Demonstration of out-of-range indexing of an array.

     

    6th week.

    Lecture: Enumerated type. State machine. Pointers and indirection, passing variables by address. Strings.

    Practice: Structures. 3D vector structure. Operations and functions. More complex data types: array of structure, array in structure.

    Laboratory: Bit functions. Dump number in binary form. Bit-pattern generation, c = set(c, 5). Effect of overflow. Determination of the bits of an integer. Demonstration of floating point inaccuracy.

     

    7th week.

    Lecture: Communication between the program and the outside world. Pre-processing. Program Segmentation. Writing maintainable programs.

    Practice: Using Arrays and functions, arrays as function parameters. String algorithms. Text reverser, palindrome. String as function parameter. Array size and the length of a string. Risk of indexing out of range.

    Laboratory: Built-in string processing functions. Handling arrays - more exercise. Multi-dimensional arrays.

     

    8th week:

    Lecture: Array algorithms. Searches. Sorts. Recursion and quick sort.

    Practice: State machine design examples, details of implementation. TH counter, comment filter.

    State machine coding. Redirect input from file and/or to file. TH counter, comment filter. Pattern Recognition.

     

    9th week.

    Lecture: Dynamic memory management. Dynamic arrays. Dynamic encoding of a string. Systematic discussion of memory handling.

    Practice: Sorting an array. Median search. N smallest items. Interval of identical elements. Sorting keys. Cards: array of structures, sorting by suit or by rank.

    Laboratory: Coding of recursive functions. Fibonacci series, iteratively and recursively. False recursion, printing of a number. True recursion, coloring shapes.

     

    10th week.

    Lecture: Dynamic data structures: linked lists. List algorithms. Traversal, deletion, insertion.

    Practice: Coding a complete user type: Set. Work with Dynamic arrays. Storing the size, search, resize. Work with pointers to structures.

    Laboratory: Array algorithms, pointers. Search and Sort implementations. Using multiple module source, decomposition.

     

    11th week.

    Lecture: Trees, using binary trees. Search trees, decoding trees. Traversing trees. Search trees, decoding trees. Multiple indirection. Introduction to hash tables.

    Practice: Choosing a data structure. Lists; re-linking the elements, memory management.

    Laboratory: Implementation of list handling. Building a list. Writing to a file, reading from a file. Application of a sentry. Insert, delete.

     

    12th week.

    Lecture: Function pointers. Designing a function plotting program. Union, bit-field.

    Practice: Recursive functions. Tree algorithms. Nodes, levels of a tree (depth), leaves. Analysis of symmetrical trees.

    Laboratory: File management, for example: writing an array into file and reading back. Programs split to multiple modules. Processing of command line arguments. File copy.

     

    13th week.

    Lecture: More data structures. Design of large programs. Functional decomposition of a complex project.

    Practice: Function pointers. Numerical integration.

    Laboratory: Binary tree handling.

     

    14th week.

    Spare lecture.

    Practice and Laboratory: practice and overview.

    9. Method of instruction

    The subject is taught once a week to the whole year group and once a week in the classroom for the study groups. The computer laboratory sessions of the subject are held in the Student Computing Centre (SCC) at the scheduled times, with small group instruction. Group and class schedules will be published in a separate announcement on the course website.

    The aim of the laboratory is to enable students to gain practical skills by trying out the methods presented in the lecture and the methods learned, and to master the use of development environments at a skill level. The material for the exercises will follow the lectures and labs and will support a deeper understanding of the topics and a detailed knowledge of the algorithms.

    In order to improve the mastery of the material, a major homework assignment will be linked to the laboratory sessions. The small final exams are designed to motivate continuous preparation. The large final papers focus on the application of the knowledge acquired.

    10. Assessment

    During the semester:

    • Presence: It is compulsory to visit the lectures and practices. The presence is checked every time. The absence of a student at the lectures, classroom and laboratory practices must be less than 30%, for each type individually. Reaching this limit in either of the lecture or practice results in an incomplete. Tutors are entitled to check the required knowledge of the students prior to the lab, or during the lab. The lab is registered as absence for students failing this check.
    • Small tests. There are six small tests on classroom practices. The sum of the best four of the test much reach 50%. A miss test is treated as 0.
    • Mid-semester tests. There are two mid-semester tests. These have no minimum limit one by one, but the sum of the score of the two tests must reach 50%. If it is better for the student, the score of the second mid-term test is doubled, and that score is used instead of the sum. A miss test is treated as 0.
    • Beside the small tests there is a long-term individual homework assignment for each student to solve. The specification is published on week 6, the solution is to be delivered on week 13.

    Mid-semester mark is given to those students who completed all assessments. The mark is based on the sum of the score of the two mid-semester tests (2×40), and the score of the selected small tests (4×10). The individual homework is worth 20 points. The maximum therefore is 140 points. If the assessments are completed, the student passes the course.

    11. Recaps

    There is no repeat possibility for the presence.

    The small tests can only be accomplished during the semester. Only the best four of the six small tests is taken into consideration.

    The mid-term tests can be repeated at the repeat week. The score of the retake test will be doubled, and it will override any previous scores.

    For the homework assessment, late delivery is accepted by 12:00 of the last day of the semester (Friday of week 14) while paying a late delivery fee. Beyond week 14 there is no way to deliver a homework.

    12. Consultations

    Consultation: the usual way is via e-mail. Personal consultation is also possible based on reconciliation with the teacher.

    13. References, textbooks and resources
    • B.W. Kernighan - D.M. Ritchie: The C Programming Language. Prentice Hall, 1988. 2nd edition.
    • Stephen G. Kochan: Programming in C (3rd Edition). Sams Publishing, 2004.
    • N.Wirth: Algorithms + Data Structures = Programs. Prentice Hall, 1976. 1st edition.
    14. Required learning hours and assignment

    Contact lessons

    84

    Preparation for lessons

    56

    Preparation for midterm

    42

    Preparation of homework

    28

    Mastery of assigned written material

    0

    Preparation for exam

    0

    Total

    210

    15. Syllabus prepared by

    Name:

    Position:

    Department

    Dr. Czirkos Zoltán

    Senior Lecturer

    D. of Electron Devices

    Programming co-operative of departments of Faculty of Electrical Engineering and Informatics.

    IMSc program The IMSc program is only available in Hungarian.
    IMSc score The IMSc program is only available in Hungarian.