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

    Belépés
    címtáras azonosítással

    vissza a tantárgylistához   nyomtatható verzió    

    Programming

    A tantárgy neve magyarul / Name of the subject in Hungarian: Programozás

    Last updated: 2019. május 17.

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

    BME Faculty of Natural Sciences

    BSc in Phisics Program

    Course ID Semester Assessment Credit Tantárgyfélév
    VIEEA024   2/0/2/f 4  
    3. Course coordinator and department Dr. Pohl László,
    Web page of the course http://www.eet.bme.hu/vieea024/
    4. Instructors

    Zsolt Kohári

    Assistant researcher

    Department of Electron Devices

    Dr. László Pohl

    Associate professor

    Department of Electron Devices

    6. Pre-requisites
    Kötelező:
    Kepzes("9N-AF06")

    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ó.

    7. Objectives, learning outcomes and obtained knowledge Tha aim of the subject is to acquaint students with the general steps of problem solution by computer, typical data structures and their management, and basic algorithms (sorting, searching, some numerical methods). Students acquire skills level of proficiency in the use of a programming language. C language is widely used in practice, the students can rely on in their later studies. Students will learn to use basic tools for software development. Another important objective of the subject is to learn writing portable programs.
    8. Synopsis

    Week 1: synopsys of the subject, requirements, algorithm, data, language, programming languages, why the C? specification, design, coding, testing, documenting, algorithm choice questions in connection with GCD (trial and error, prime factors, Euclidean formula), elements of algorithms: sequence, branching, cycles, n! calculation:
    - algorithm selection, parts, data structure,
    - narrative description of the algorithm
    - algorithm by block diagram
    - encoding
    a small analysis: mandatory elements of a C program, the frame, the main function, return 0
    the purpose and significance of indenting, scanf for reading integer values, printf for writing integer values.

    Week 2: storage units: variables, constants, functions
    mandatory declaration / definition, syntax / semantics: Syntax diagram, syntax of an integer value, Basic syntax rules: free writing mode (white spaces), a != A, #preproc, / * comment * /, regular identifiers
    predefined types, why we use int and double, constant int definition in dec, oct, hex forms, lack of the logic type, logic value of numbers
    Instructions: ;, declaration/definition, expression instruction, conditional instruction, cycle (now just the while), control statements (switch/case just mentioned), {}, block diagram of if..else and while, Conditions
    - relational operators ('==' != '=', the dangers)
    - logic operators !, &&, ||

    Week 3: supplement and deepen the knowledge of the past week. control structures, instructions, built-in types, number representation.
    Use of library functions

    Week 4: Basic operators: arithmetic, integer, real, type cast, assignment, sizeof, relational, logic, bitwise, shortcut, ?:

    Week 5: iterative solutions, =, pre/post ++ --, dangers of post, arrays, 1D, 2D, strings, pointers

    Week 6: 1D dynamic array (example of use), (only breefly, at the level of usage: getchar, putchar, EOF, ctrl+z/ctrl+d) filter program template, enum type, finite automaton example: writing out the comments from a C code, ly counter

    Week 7: Functions, memory areas allocated in the program, what is/will be where, the heap, behavior of the stack, the consequences of the differences. Storage classes (for local variables), the function call mechanism, multiple return values: void descart2polar(double, double, double*, double *), why forbidden to return local variable address

    Week 8: struct, ., ->, typedef, direct selection sort, bubble sort, for structure array also, comparing functions, strcmp, sorting by text.

    Week 9: function pointers, useage of qsort. Making of string, int and double comparing funtion (by a structure array sorting example), introducing recursive structure, ONLY drawn. Unidirectional, bidirectional, "arranged according to several criteria" list, binary tree, coded only the search in the list by cycle.

    Week 10: Managing lists, insertion, search, deleting functions, the two possible head handling: head=insert(head..., and insert (&head,..., interpretation of recursion by n!, binary tree management, inorder traversal only in code level

    Week 11: I/O, FILE fopen, fclose, feof, f/sprintf, f/sscanf, getc/s, Putc/s, parameters of main

    Week 12: In short, what is missed: the comma op, (union, bitfield vararg), the C preprocessor.

    Week 13: TEST

    Week 14: backup (if there is no need to make up missed lectures then: making programs from multiple source file)

    9. Method of instruction
    One 90 minutes lecture and one 90 minutes practice in computer lab in every week. The purpose of the lab is to have deepen and to have tried in practice what was said in the lecture, and to have learnt basic algorithms.
    10. Assessment

    During the study period:

    There is one 2 hours lecture and one 2 houres laboratory a week. The lab presence is mandatory, checked at each ocassion. Insufficient laboratory preparedness counts as missed lesson. During the semester there are five small tests written in labs. Small tests cannot be repeated. A missed small test is counted as 0. The average of the three most successful small test matter in the final mark. During the semester time a "big" midterm test is written. Succesfull mindterm is required. The midterm can be repeated one time in the study period and one time in the replacement period. A homework will be given in the sixth week of the semester in lab and it mast be presented by the student until the last lab lesson of the semester. The homework can be presented in the replacement periode for a fee.

    Requirements for the successful completion of the course:
    • not missed more than 30% of labs,
    • the average of the three best small tests results of at least sufficient,
    • at least a pass grade in the midterm
    • the homework finished within the prescribed time and received a minimum pass grade.

    The final grade comes as
    • midterm result: 35% weight
    • the average of the three best small tests: 35% weight
    • homework rating: 30% weight.
    • the lab leader can change the result by +/- 0.5 grade depending on the activity of the student.

    11. Recaps The midterm test can be repeated one time in the study period and one time in the replacement period. Participation and small test replacement is not possible. Additional homework submission is possible until the end of the replacement week for a fee.
    12. Consultations Consultation is by e-mail or personally by appointment.
    13. References, textbooks and resources

    Any book or note of the C programming language can be used. For example:

    [1] B.W. Kernighan - D.M. Ritchie: The C Programming Language. Prentice Hall, 1988. 2nd edition
    [2] Dan Gookin: C All-in-One Desk Reference For Dummies, Wiley Publishing, Inc. (September 3, 2004)

    14. Required learning hours and assignment
    Classes56
    Preparation for classes
    21
    Preparation for test
    20
    Homework assessment
    23
    Learning of prescribed matters 
    Preparation for exam 
    Sum 120
    15. Syllabus prepared by

    Dr. András Poppe

    Associate professor

    Department of Electron Devices

    Zsolt Kohári

    Assistant lecturer

    Department of Electron Devices