Download presentation
Presentation is loading. Please wait.
Published bySuhendra Sumadi Modified over 5 years ago
1
Building Windows Applications by Visual C++ and Homework #3 Assignment
Speaker: Yao-Ting Huang Advisor: Kun-Mao Chao National Taiwan University Department of Computer Science & Information Engineering Algorithms and Computational Biology Lab. 2019/4/23
2
Windows Programming Windows Application Programming Interfaces (API) is a set of functions provided by the Microsoft Windows operating system. You can invoke these API to write a Windows application (e.g., create a dialog or a button). You can write programs with specific functionalities or advanced control (e.g., manipulating hardware data). The Windows API was originally written for C. The Windows API requires that you have to worry about lots of details (e.g., many parameters for a function call). See an example in Visual C++.
3
Microsoft Foundation Classes
Microsoft Foundation Classes (MFC) groups the Windows API into approximately 200 C++ classes. You can create a Windows application easier by using MFC than invoking Windows API. The MFC is written for C++ not for C. But not every Windows API can be found in MFC. MFC is suitable for most general Windows applications, where traditional Windows programming is suitable for special-purpose application. See an example in Visual C++.
4
Building Windows Application by Visual C++
You can create both Windows API applications and MFC applications in Visual C++. It is better to have a book in your hand. You can not memorize all the Windows API or MFC classes. If you write your homework or project by Windows programming, we will give you unlimited bonus.
5
Homework #3 (1/2) Write a program that prompts the user to input the boiling point in degree Celsius. The program should output the substance corresponding to the boiling point listed in the table. The program should output the message “substance unknown” when it does not match any substance. Substance Boiling point Water 100°C Mercury 357°C Copper 1187°C Silver 2193°C Gold 2660°C
6
Homework #3 (2/2) Examples of the scenario of your program.
You can determine the substance within a range of boiling points to get bonus (e.g., +5 degrees). Please refer to pages in the text book. You can apply any technique in Chapter 4. The due date is 11/4 (demo in the Lab. lecture). Please input: 357 The substance is Mercury. Please input: 3333 Substance unknown. Please input: 359 The substance is Mercury.
7
Outline of Lecture Today
Create a Windows application. Create a MFC Windows application. Demo of your Homework #2 if you finish it.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.