lecture 0
play

Lecture 0 Course information Computer environment Algorithms and - PowerPoint PPT Presentation

Lecture 0 Course information Computer environment Algorithms and programming TDDD33 at a glance Course Leader: Sam Le Assistant One: Alexander Johansson Assistant Two: Lars Backman Course code: TDDD33 Homepage:


  1. Lecture 0 Course information Computer environment Algorithms and programming

  2. TDDD33 at a glance • Course Leader: Sam Le • Assistant One: Alexander Johansson • Assistant Two: Lars Backman • Course code: TDDD33 • Homepage: www.ida.liu.se/~TDDD33 • Book: C++ Primer by Lippman, Lajoie, Moo • Credits: 6hp (1+3+2) • Workload: 160 hours (about 30 hours/hp)

  3. Timeline • This week: – TODAY: Register! – Lab 0 – STONE (individual). – Find lab partner (collaborative). Who is ideal? • Week 36-41: – Lectures, Lessons (collaborative) and Labs (work in pairs). • Week 42-43: – Break for examinations in other HT1 (autumn 1) courses.

  4. Timeline • Week 44-51: – Lectures, Lessons (collaborative) and Labs (work in pairs). • Week 52-1: – Merry and Happy days before Examination. • Week 2 in 2017: – Exam

  5. Important events • Week 37-42: Bonus deadlines for labs. – Reward: More time for higher grade on exam! • Week 46-51: Bonus deadlines for labs. – Reward: More time for higher grade on exam! • Week 3: Computer exam (first chance).

  6. Events during Jan-Aug • Jan – Mars: – Course is sleeping like a bear during winter. Do not wake it up. • Eastern: – Bear wake up briefly to take a leak. Computer exam (second chance). • Apr – Aug: – Course is sleeping like a bear during winter. Do not wake it up. • August: – Bear wake up for new year. Computer exam (third chance). Course start next year.

  7. Webreg • Important to register to a lab group. – Before the first lab session (this afternoon) • Link on the course webpage

  8. Lab demonstrations • Require both participating students attending and ready to answer questions about the lab. • Require a complementary code hand-in after successful demonstration. • Are accepted between first and about one week past the last lecture.

  9. Sendlab • System to send in labs • More info on the first lab session

  10. Stone • Introduction to Unix/Linux system – Do on your own time. – No examination – Help during lab session

  11. Computer examination • You solve ”real” problems on real computers using real tools (lab environment equivalent) • Your grade depend on number of assignments solved completely with quality in given time. – 1 assignment in 4 hours for grade 3 – 2 assignments in 4 hours for grade 4 – 3 assignments in 4 hours for grade 5 (or 2 in 2.5h) – bonus from labs give extra time • ”Live” correction, you can rework problems!

  12. Lecture vs Lesson vs Lab • Lecture: – I talk. You try to answer my questions. You ask lots of questions that I answer. • Lesson: – Assistant present a problem. You solve it together, interactively, by telling assistant the next step to do. • Lab: – We provide requirement specification. You learn how to write programs that fulfil the spec. • Exam: – We provide requirement specification. You demonstrate that you learned.

  13. Programming (small perspective) Problem solving! 1. Write pseudo-code: – Divide large problems in smaller problems... – ... figure out an algorithm for each... – ... and conqer. 2. Write C++-code: – Translate the pseudo-code to valid C++. 3. Compile and test: – Verify your code work as required by spec.

  14. Work process (in theory) • Problem solving : create pseudo-code. • Translate your pseudo-code to C++. • Compile the program. • Run the program. • It works! DON’T do it for the entire program at once. Do it for one small subset first and move on to the next subset only when the first works.

  15. Work process (in practice) 1. Problem solving : create pseudo-code. 2. Translate (yet another) part of your pseudo- code to C++. 3. Compile the program. Errors occur. Restart. 4. Run the program. Errors occur. Restart. 5. It does not work to spec. Restart. 6. Assistant find flaws. Restart. 7. (You want to learn more. Restart.)

  16. First main • Starting point for the operating system • Only one main per program

  17. Output • cout • operator << • string literal • includes • comments for human reader

  18. Simple example #include <iostream> using namespace std; int main() { cout << “hello world” << endl; }

  19. Input • cin • operator >> • variable • type

  20. Simple example #include <iostream> using namespace std; int main() { int x; cin >> x; cout << x << endl; }

Recommend


More recommend