Difference between revisions of "IU:TestPage"

From IU
Jump to navigation Jump to search
Tag: Manual revert
Line 1: Line 1:
   
  +
= Introduction to Programming =
= Optimization =
 
* '''Course name''': Optimization
+
* '''Course name''': Introduction to Programming
* '''Code discipline''': R-01
+
* '''Code discipline''': CSE101
* '''Subject area''':
+
* '''Subject area''': Programming Languages and Software Engineering
   
 
== Short Description ==
 
== Short Description ==
  +
This course covers the following concepts: Basic concept - algorithm, program, data; Computer architecture basics; Structured programming; Object-oriented programming; Generic programming; Exception handling; Programming by contract (c); Functional programming; Concurrent programming.
This course covers the following concepts: Optimization of a cost function; Algorithms to find solution of linear and nonlinear optimization problems.
 
   
 
== Prerequisites ==
 
== Prerequisites ==
Line 22: Line 22:
 
! Section !! Topics within the section
 
! Section !! Topics within the section
 
|-
 
|-
| Linear programming ||
+
| Introduction to programming ||
  +
# Basic definitions – algorithm, program, computer, von Neumann architecture, CPU lifecycle.
# simplex method to solve real linear programs
 
  +
# Programming languages history and overview. Imperative (procedural) and functional approaches.
# cutting-plane and branch-and-bound methods to solve integer linear programs.
 
  +
# Translation – compilation vs. interpretation. JIT, AOT. Hybrid modes.
  +
# Introduction to typification. Static and dynamic typing. Type inference. Basic types – integer, real, character, boolean, bit. Arrays and strings. Records-structures.
  +
# Programming – basic concepts. Statements and expressions. 3 atomic statements - assignment, if-check, goto. Control structures – conditional, assignment, goto, case-switch-inspect, loops.
  +
# Variables and constants.
  +
# Routines – procedures and functions.
 
|-
 
|-
| Nonlinear programming ||
+
| Introduction to object-oriented programming ||
  +
# Key principles of object-oriented programming
# methods for unconstrained optimization
 
  +
# Overloading is not overriding
# linear and nonlinear least-squares problems
 
  +
# Concepts of class and object
# methods for constrained optimization
 
  +
# How objects can be created?
  +
# Single and multiple inheritance
  +
|-
  +
| Introduction to generics, exception handling and programming by contract (C) ||
  +
# Introduction to generics
  +
# Introduction to exception handling
  +
# Introduction to programming by contract (C)
  +
|-
  +
| Introduction to programming environments ||
  +
# Concept of libraries as the basis for reuse.
  +
# Concept of interfaces/API. Separate compilation.
  +
# Approaches to software documentation.
  +
# Persistence. Files.
  +
# How to building a program. Recompilation problem. Name clashes, name spaces
  +
|-
  +
| Introduction to concurrent and functional programming ||
  +
# Concurrent programming.
  +
# Functional programming within imperative programming languages.
 
|}
 
|}
 
== Intended Learning Outcomes (ILOs) ==
 
== Intended Learning Outcomes (ILOs) ==
   
 
=== What is the main purpose of this course? ===
 
=== What is the main purpose of this course? ===
  +
The Introduction to Programming course teaches the fundamental concepts and skills necessary to perform programming at a professional level. Students will learn how to master the fundamental control structures, data structures, reasoning patterns and programming language mechanisms characterizing modern programming, as well as the fundamental rules of producing high-quality software. They will acquire the necessary programming background for later courses introducing programming skills in specialized application areas. The course focuses on Object Oriented paradigm.
The main purpose of this course to make the student aware of basic notions of mathematical programming and of its importance in the area of engineering.
 
   
 
=== ILOs defined at three levels ===
 
=== ILOs defined at three levels ===
Line 40: Line 63:
 
==== Level 1: What concepts should a student know/remember/explain? ====
 
==== Level 1: What concepts should a student know/remember/explain? ====
 
By the end of the course, the students should be able to ...
 
By the end of the course, the students should be able to ...
  +
* Basic concepts of programming. What is algorithm, program.
* explain the goal of an optimization problem
 
  +
* Concept of typification. Dynamic and static types.
* remind the importance of converge analysis for optimization algorithms
 
  +
* Concepts of structured programming, object-oriented one.
* draft solution codes in Python/Matlab.
 
  +
* Concepts of exception handling and generic programming.
  +
* Concurrent programming and functional programming in imperative programming languages.
  +
* verification of the software based on programming by contract (C)
   
 
==== Level 2: What basic practical skills should a student be able to perform? ====
 
==== Level 2: What basic practical skills should a student be able to perform? ====
 
By the end of the course, the students should be able to ...
 
By the end of the course, the students should be able to ...
  +
* How to create high quality software using mainstream concepts of programming.
* formulate a simple optimization problem
 
  +
* What is object-oriented programming and its main advantages
* select the appropriate solution algorithm
 
  +
* How to increase the level of abstraction with help of genericity.
* find the solution.
 
  +
* How to create concurrent programs and what are the main issues related to this kind of programming
   
 
==== Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios? ====
 
==== Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios? ====
 
By the end of the course, the students should be able to ...
 
By the end of the course, the students should be able to ...
  +
* To be able to create quality programs in Java.
* the simplex method
 
* algorithms to solve nonlinear optimization problems.
 
 
== Grading ==
 
== Grading ==
   
Line 62: Line 88:
 
! Grade !! Range !! Description of performance
 
! Grade !! Range !! Description of performance
 
|-
 
|-
| A. Excellent || 86-100 || -
+
| A. Excellent || 85-100 || -
 
|-
 
|-
| B. Good || 71-85 || -
+
| B. Good || 75-84 || -
 
|-
 
|-
| C. Satisfactory || 56-70 || -
+
| C. Satisfactory || 60-75 || -
 
|-
 
|-
| D. Poor || 0-55 || -
+
| D. Poor || 0-59 || -
 
|}
 
|}
   
Line 77: Line 103:
 
! Activity Type !! Percentage of the overall course grade
 
! Activity Type !! Percentage of the overall course grade
 
|-
 
|-
| Labs/seminar classes (weekly evaluations) || 0
+
| Labs/seminar classes || 40
 
|-
 
|-
| Interim performance assessment (class participation) || 1000
+
| Interim performance assessment || 30
 
|-
 
|-
| Exams || 100
+
| Exams || 30
 
|}
 
|}
   
Line 90: Line 116:
   
 
=== Open access resources ===
 
=== Open access resources ===
  +
* Textbook: C.H. Papadimitriou, K. Steiglitz, Combinatorial Optimization, Dover, New York, 1982.
 
* Textbook: D. Bertsekas, Nonlinear Programming, Athena Scientific, 1999.
 
   
 
=== Closed access resources ===
 
=== Closed access resources ===
Line 104: Line 129:
 
|+ Activities within each section
 
|+ Activities within each section
 
|-
 
|-
! Learning Activities !! Section 1 !! Section 2
+
! Learning Activities !! Section 1 !! Section 2 !! Section 3 !! Section 4 !! Section 5
 
|-
 
|-
| Midterm evaluation || 1 || 1
+
| Homework and group projects || 1 || 1 || 1 || 1 || 1
 
|-
 
|-
| Testing (written or computer based) || 1 || 1
+
| Midterm evaluation || 1 || 1 || 1 || 0 || 0
  +
|-
  +
| Testing (written or computer based) || 1 || 0 || 0 || 1 || 1
  +
|-
  +
| Oral polls || 1 || 1 || 1 || 1 || 1
  +
|-
  +
| Discussions || 1 || 1 || 1 || 1 || 1
  +
|-
  +
| Development of individual parts of software product code || 0 || 1 || 0 || 0 || 0
  +
|-
  +
| Reports || 0 || 1 || 0 || 0 || 0
 
|}
 
|}
 
== Formative Assessment and Course Activities ==
 
== Formative Assessment and Course Activities ==
Line 120: Line 155:
 
! Activity Type !! Content !! Is Graded?
 
! Activity Type !! Content !! Is Graded?
 
|-
 
|-
| Question || How a convex set and a convex function are defined? || 1
+
| Question || What is the difference between compiler and interpreter? || 1
 
|-
 
|-
| Question || What is the difference between polyhedron and polytope? || 1
+
| Question || What is the difference between type and variable? || 1
 
|-
 
|-
| Question || Why does always a linear program include constraints? || 1
+
| Question || What is the background of structured programming? || 1
 
|-
 
|-
  +
| Question || How to compile a program? || 0
| Question || Consider the problem: <br> <math>{\displaystyle {\displaystyle {\text{minimize }}c_{1}x_{1}+c_{2}x_{2}+c_{3}x_{3}+c_{4}x_{4}}}</math> <br> <math>{\displaystyle {\displaystyle {\text{subject to }}x_{1}+x_{2}+x_{3}+x_{4}=2}}</math> <br> <math>{\displaystyle {\displaystyle 2x_{1}+3x_{3}+4x_{4}=2}}</math> <br> <math>{\displaystyle {\displaystyle x_{1},x_{2},x_{3},x_{4}\geqslant 0}}</math> <br> Solve it using simplex method. || 0
 
 
|-
 
|-
  +
| Question || How to run a program? || 0
| Question || Consider the problem: <br> <math>{\displaystyle {\displaystyle {\text{minimize }}x_{1}+x_{2}}}</math> <br> <math>{\displaystyle {\displaystyle {\text{subject to }}-5x_{1}+4x_{2}\leq 0}}</math> <br> <math>{\displaystyle {\displaystyle 6x_{1}+2x_{2}\ \leq 17}}</math> <br> <math>{\displaystyle {\displaystyle x_{1},\ x_{2}\geq 0}}</math> <br> Solve it using cutting-plane and branch-and-bound methods. || 0
 
  +
|-
  +
| Question || How to debug a program? || 0
 
|}
 
|}
 
==== Section 2 ====
 
==== Section 2 ====
Line 136: Line 173:
 
! Activity Type !! Content !! Is Graded?
 
! Activity Type !! Content !! Is Graded?
 
|-
 
|-
| Question || Which are the necessary and sufficient conditions of optimality of a generic minimization/maximization problem? || 1
+
| Question || What is the meaning of polymorphism? || 1
 
|-
 
|-
| Question || What is the goal of a descent algorithm? || 1
+
| Question || How to check the dynamic type of an object? || 1
 
|-
 
|-
| Question || What does it mean to fit some experimental data points || 1
+
| Question || What are the limitations of single inheritance? || 1
 
|-
 
|-
  +
| Question || What are the issues related with multiple inheritance? || 1
| Question || Consider the problem: <br> <math>{\displaystyle {\displaystyle {\text{minimize }}{\frac {1}{2}}\left(x_{1}^{1}+x_{2}^{2}\right)}}</math> <br> Solve it using the suitable method. || 0
 
 
|-
 
|-
  +
| Question || How to handle array of objects of some class type? || 0
| Question || Consider the problem: <br> <math>{\displaystyle {\displaystyle {\text{minimize }}-\left(x_{1}-2\right)^{2}}}</math> <br> <math>{\displaystyle {\displaystyle {\text{subject to }}\ x_{1}+x_{2}^{2}=1}}</math> <br> <math>{\displaystyle {\displaystyle -1\leq x_{2}\leq 1}}</math> <br> Solve it using the suitable method. || 0
 
  +
|-
  +
| Question || How to implement the class which logically has to have 2 constructors with the same signature but with different semantics? || 0
  +
|}
  +
==== Section 3 ====
  +
{| class="wikitable"
  +
|+
  +
|-
  +
! Activity Type !! Content !! Is Graded?
  +
|-
  +
| Question || What is constrained genericity? || 1
  +
|-
  +
| Question || What is exception? || 1
  +
|-
  +
| Question || What is assertion? || 1
  +
|-
  +
| Question || How constrained genericity may be used for sorting of objects? || 0
  +
|-
  +
| Question || In which order catch blocks are being processed? || 0
  +
|-
  +
| Question || Where is the problem when precondition is violated? || 0
  +
|}
  +
==== Section 4 ====
  +
{| class="wikitable"
  +
|+
  +
|-
  +
! Activity Type !! Content !! Is Graded?
  +
|-
  +
| Question || How reuse helps to develop software? || 1
  +
|-
  +
| Question || How concept of libraries and separate compilation co-relate? || 1
  +
|-
  +
| Question || What are the benefits of integrating documentation into the source code? || 1
  +
|-
  +
| Question || Why is it essential to have persistent data structures? || 1
  +
|-
  +
| Question || What is to be done to design and develop a library? || 0
  +
|-
  +
| Question || How to add documenting comments into the source code? || 0
  +
|-
  +
| Question || What ways exists in Java to support persistence ? || 0
  +
|}
  +
==== Section 5 ====
  +
{| class="wikitable"
  +
|+
  +
|-
  +
! Activity Type !! Content !! Is Graded?
  +
|-
  +
| Question || Explain the key differences parallelism and concurrency || 1
  +
|-
  +
| Question || What are the key issues related to parallel execution? || 1
  +
|-
  +
| Question || What are the models of parallel execution? || 1
  +
|-
  +
| Question || What is the difference between function and object? || 1
  +
|-
  +
| Question || Which Java construction support concurrency? || 0
  +
|-
  +
| Question || What is a thread? || 0
  +
|-
  +
| Question || What is in-line lambda function? || 0
 
|}
 
|}
 
=== Final assessment ===
 
=== Final assessment ===
 
'''Section 1'''
 
'''Section 1'''
  +
# What are the basic control structure of structured programming?
# Why does the simplex method require to be initialized with a correct basic feasible solution?
 
  +
# What is the difference between statements and expressions?
# How one can test absence of solutions to a linear program?
 
  +
# What are the benefits of type inference?
# How one can test unbounded solutions to a linear program?
 
# How can the computational complexity of an optimization algorithm can be defined?
 
 
'''Section 2'''
 
'''Section 2'''
  +
# Name all principles of object-oriented programming?
# How is it possible to compute the Lagrange multiplier of a constrained optimization problem?
 
  +
# Explain what conformance means?
# Which are the convergence conditions of the steepest descent method?
 
  +
# Explain why cycles are prohibited in the inheritance graph?
# Which are the convergence conditions of the Newton’s method?
 
  +
'''Section 3'''
# How can one “penalize” a constraint?
 
  +
# Can array be treated as generic class?
  +
# What is the difference between throw and throws in Java?
  +
# What is purpose of the class invariant?
  +
'''Section 4'''
  +
# How to deal with name clashes?
  +
# What is the main task of the recompilation module?
  +
# What are the differences between different formats of persistence files?
  +
'''Section 5'''
  +
# What is the meaning of SIMD and MIMD?
  +
# What are the implications of the Amdahl’s law?
  +
# What model of concurrency Java relies on?
  +
# Which function can be considered as pure?
  +
# How to declare a function to accept a functional object as its argument?
  +
# How Java supports high-order functions?
  +
# How capturing variables works in Java?
   
 
=== The retake exam ===
 
=== The retake exam ===
 
'''Section 1'''
 
'''Section 1'''
  +
# Consider the problem:
 
# <math>{\displaystyle {\displaystyle {\text{minimize }}x_{1}+x_{2}}}</math><math>{\displaystyle {\displaystyle {\text{subject to }}x_{1}+{2x}_{2}+2x_{3}\leq 20}}</math><math>{\displaystyle {\displaystyle 2x_{1}+x_{2}+2x_{3}\leq 20}}</math><math>{\displaystyle {\displaystyle 2x_{1}+2x_{2}+x_{3}\leq 20}}</math><math>{\displaystyle {\displaystyle x_{1},\ x_{2},\ x_{3}\geq 0}}</math>Solve it using simplex method.
 
# Consider the problem:
 
# <math>{\displaystyle {\displaystyle {\text{maximize }}15x_{1}+{12x}_{2}+4x_{3}+2x_{4}}}</math><math>{\displaystyle {\displaystyle {\text{subject to }}8x_{1}+5x_{2}+3x_{3}+2x_{4}\leq 10}}</math><math>{\displaystyle {\displaystyle x_{i}\in \{0,1\}}}</math>Solve it using cutting-plane and branch-and-bound methods.
 
 
'''Section 2'''
 
'''Section 2'''
  +
# Consider the problem:
 
  +
'''Section 3'''
# <math>{\displaystyle {\displaystyle {\text{minimize }}100\left(x_{2}-x_{1}^{2}\right)^{2}+\left(1-x_{1}\right)^{2}}}</math><math>{\displaystyle {\displaystyle {\text{subject to }}x_{1},\ x_{2}\geq 0}}</math>Solve it using the suitable method.
 
  +
  +
'''Section 4'''
  +
  +
'''Section 5'''

Revision as of 11:01, 11 November 2022

Introduction to Programming

  • Course name: Introduction to Programming
  • Code discipline: CSE101
  • Subject area: Programming Languages and Software Engineering

Short Description

This course covers the following concepts: Basic concept - algorithm, program, data; Computer architecture basics; Structured programming; Object-oriented programming; Generic programming; Exception handling; Programming by contract (c); Functional programming; Concurrent programming.

Prerequisites

Prerequisite subjects

Prerequisite topics

Course Topics

Course Sections and Topics
Section Topics within the section
Introduction to programming
  1. Basic definitions – algorithm, program, computer, von Neumann architecture, CPU lifecycle.
  2. Programming languages history and overview. Imperative (procedural) and functional approaches.
  3. Translation – compilation vs. interpretation. JIT, AOT. Hybrid modes.
  4. Introduction to typification. Static and dynamic typing. Type inference. Basic types – integer, real, character, boolean, bit. Arrays and strings. Records-structures.
  5. Programming – basic concepts. Statements and expressions. 3 atomic statements - assignment, if-check, goto. Control structures – conditional, assignment, goto, case-switch-inspect, loops.
  6. Variables and constants.
  7. Routines – procedures and functions.
Introduction to object-oriented programming
  1. Key principles of object-oriented programming
  2. Overloading is not overriding
  3. Concepts of class and object
  4. How objects can be created?
  5. Single and multiple inheritance
Introduction to generics, exception handling and programming by contract (C)
  1. Introduction to generics
  2. Introduction to exception handling
  3. Introduction to programming by contract (C)
Introduction to programming environments
  1. Concept of libraries as the basis for reuse.
  2. Concept of interfaces/API. Separate compilation.
  3. Approaches to software documentation.
  4. Persistence. Files.
  5. How to building a program. Recompilation problem. Name clashes, name spaces
Introduction to concurrent and functional programming
  1. Concurrent programming.
  2. Functional programming within imperative programming languages.

Intended Learning Outcomes (ILOs)

What is the main purpose of this course?

The Introduction to Programming course teaches the fundamental concepts and skills necessary to perform programming at a professional level. Students will learn how to master the fundamental control structures, data structures, reasoning patterns and programming language mechanisms characterizing modern programming, as well as the fundamental rules of producing high-quality software. They will acquire the necessary programming background for later courses introducing programming skills in specialized application areas. The course focuses on Object Oriented paradigm.

ILOs defined at three levels

Level 1: What concepts should a student know/remember/explain?

By the end of the course, the students should be able to ...

  • Basic concepts of programming. What is algorithm, program.
  • Concept of typification. Dynamic and static types.
  • Concepts of structured programming, object-oriented one.
  • Concepts of exception handling and generic programming.
  • Concurrent programming and functional programming in imperative programming languages.
  • verification of the software based on programming by contract (C)

Level 2: What basic practical skills should a student be able to perform?

By the end of the course, the students should be able to ...

  • How to create high quality software using mainstream concepts of programming.
  • What is object-oriented programming and its main advantages
  • How to increase the level of abstraction with help of genericity.
  • How to create concurrent programs and what are the main issues related to this kind of programming

Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?

By the end of the course, the students should be able to ...

  • To be able to create quality programs in Java.

Grading

Course grading range

Grade Range Description of performance
A. Excellent 85-100 -
B. Good 75-84 -
C. Satisfactory 60-75 -
D. Poor 0-59 -

Course activities and grading breakdown

Activity Type Percentage of the overall course grade
Labs/seminar classes 40
Interim performance assessment 30
Exams 30

Recommendations for students on how to succeed in the course

Resources, literature and reference materials

Open access resources

Closed access resources

Software and tools used within the course

Teaching Methodology: Methods, techniques, & activities

Activities and Teaching Methods

Activities within each section
Learning Activities Section 1 Section 2 Section 3 Section 4 Section 5
Homework and group projects 1 1 1 1 1
Midterm evaluation 1 1 1 0 0
Testing (written or computer based) 1 0 0 1 1
Oral polls 1 1 1 1 1
Discussions 1 1 1 1 1
Development of individual parts of software product code 0 1 0 0 0
Reports 0 1 0 0 0

Formative Assessment and Course Activities

Ongoing performance assessment

Section 1

Activity Type Content Is Graded?
Question What is the difference between compiler and interpreter? 1
Question What is the difference between type and variable? 1
Question What is the background of structured programming? 1
Question How to compile a program? 0
Question How to run a program? 0
Question How to debug a program? 0

Section 2

Activity Type Content Is Graded?
Question What is the meaning of polymorphism? 1
Question How to check the dynamic type of an object? 1
Question What are the limitations of single inheritance? 1
Question What are the issues related with multiple inheritance? 1
Question How to handle array of objects of some class type? 0
Question How to implement the class which logically has to have 2 constructors with the same signature but with different semantics? 0

Section 3

Activity Type Content Is Graded?
Question What is constrained genericity? 1
Question What is exception? 1
Question What is assertion? 1
Question How constrained genericity may be used for sorting of objects? 0
Question In which order catch blocks are being processed? 0
Question Where is the problem when precondition is violated? 0

Section 4

Activity Type Content Is Graded?
Question How reuse helps to develop software? 1
Question How concept of libraries and separate compilation co-relate? 1
Question What are the benefits of integrating documentation into the source code? 1
Question Why is it essential to have persistent data structures? 1
Question What is to be done to design and develop a library? 0
Question How to add documenting comments into the source code? 0
Question What ways exists in Java to support persistence ? 0

Section 5

Activity Type Content Is Graded?
Question Explain the key differences parallelism and concurrency 1
Question What are the key issues related to parallel execution? 1
Question What are the models of parallel execution? 1
Question What is the difference between function and object? 1
Question Which Java construction support concurrency? 0
Question What is a thread? 0
Question What is in-line lambda function? 0

Final assessment

Section 1

  1. What are the basic control structure of structured programming?
  2. What is the difference between statements and expressions?
  3. What are the benefits of type inference?

Section 2

  1. Name all principles of object-oriented programming?
  2. Explain what conformance means?
  3. Explain why cycles are prohibited in the inheritance graph?

Section 3

  1. Can array be treated as generic class?
  2. What is the difference between throw and throws in Java?
  3. What is purpose of the class invariant?

Section 4

  1. How to deal with name clashes?
  2. What is the main task of the recompilation module?
  3. What are the differences between different formats of persistence files?

Section 5

  1. What is the meaning of SIMD and MIMD?
  2. What are the implications of the Amdahl’s law?
  3. What model of concurrency Java relies on?
  4. Which function can be considered as pure?
  5. How to declare a function to accept a functional object as its argument?
  6. How Java supports high-order functions?
  7. How capturing variables works in Java?

The retake exam

Section 1

Section 2

Section 3

Section 4

Section 5