1. Trang chủ
  2. » Slice of Life

Lập trình hướng đối tượng: Workshop 1

4 32 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 4
Dung lượng 144,51 KB

Nội dung

Upon successful completion of this workshop, you will be able to organize source code into modules, with header and implementation files.. PREPARATION.[r]

(1)

Part A – Introduction

Compiling Modular Source Code Workshop 1

In this first workshop, you are to sub-divide a simple program into two modules and compile the modules on three different platforms

LEARNING OUTCOME

Upon successful completion of this workshop, you will be able to organize source code into modules, with header and implementation files

PREPARATION

• Install Microsoft Visual C++ 2008 Express Edition to your machine

• Create a folder named Workshops on C:\ drive to contain your workshops

• Start Microsoft Visual C++ 2008 Express Edition

• Change default project location to C:\Workshops folder

(2)

EXERCISE 1

• Create a new project named Workshop1

• Create a new cpp file named w1.cpp

• Type all below code into w1.cpp file

• Save and run program

(3)(4)

EXERCISE 2

• Comment out all code of w1.cpp

• Add new the below files to Workshop1 project:

o A header file called main.h

o An implementation file called main.cpp o A header file called getPostInt.h

o An implementation file called getPostInt.cpp

Your main.h header file should only contain the #define directive Your getPostInt.h header file should only contain the getPostInt() prototype Add appropriate header comments to each file

Recompile your modularized source code and run the executable file

SUBMIT YOUR WORKSHOP

Delete all files in Debug subfolder Compress Workshop1 folder into a file and name it as below format: <StudentCode>.zip Upload this compressed file to CMS

Ngày đăng: 10/03/2021, 14:35

TỪ KHÓA LIÊN QUAN

w