Fow Seng Joe (B1757) - PFE Laboratory 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

FACULTY OF ENGINEERING AND COMPUTING

PROGRAMME : Bachelor of Electronic Engineering with Honours /


Bachelor of Mechanical Engineering with Honours

ACADEMIC YEAR : 2022

MODULE : Programming for Engineers

MODULE CODE : BEE2009

MODULE LEADER : Mohammad Hafizuddin bin Ameruddin

ASSIGNMENT TYPE : Lab Worksheet 1

INTAKE/GROUP : Sept 2022

DISTRIBUTION DATE : Thursday, 22 September 202

SUBMISSION DATE : Thursday, 29 September 2022

STUDENT NAME STUDENT ID CLASS CODE

BENGME2A
Fow Seng Joe B1757
Lab Feedback Form

Programming for Engineers


Mark allocation chart
1 2 3 4 5
Very poor Unsatisfactory Satisfactory Good Excellent

Assessment Criteria Mark


1. Theoretical Understanding /5
2. Design Methodology /5
3. Use of Tools /5
4. Data Record / Data Collection /5
5. Results and Discussion /5
6. Determination on Achieving Goals /5
7. Lab Work Evaluation /5
8. Report Writing /5

Total Marks / 40

General Comments:

Assessor’s Signature: Date:

Name:
Learning Outcomes

Learning Outcomes Task No.

1. Describe terms associated with structured


programming.

2. Design a structured solution using the input-


process-output (IPO) chart for a given
engineering problem.
Assessed in all lab tasks
3. Develop a programming solution for a given
engineering problem.

4. Produce a written documentation for use in


program maintenance and end-user reference.
Lab 1 – Intro to C++ Programming IDE

Objective

• To implement the C++ high-level language using Code Blocks: IDE.


• To evaluate the basic input, processing, and output structure that can be
used to create multiple programs.

Introduction

This laboratory introduces the field of computer science and covers the
fundamentals of hardware, software, operating systems, programming, problem
solving, and software engineering. The components of programs, such as key
words, variables, operators, and punctuation are covered.

Instruction and Task

Read and answer the Lab 1 Intro to C++ Programming IDE that has been
uploaded in Laboratory folder in Microsoft Teams.

Answer
Lab: 1 Introduction to C++ Programming and IDE BEE2009 PFE

5
Lab 1: Introduction to C++Programming and IDE
1)
C++ Program Object Program Executable Program
General purpose Focus on objects that File program that does
programming language make the program its task based on the
encoded instruction
directly executed
OOP language Concern the behaviour of
the object
General purpose Able to receive messages,
coding language process data and send
messages
Used to develop Compiler convert source
operating system and code into object code
browsers
Used for game Each object has its own
programming and data responsibility
structures

2) (i) Used for data restriction storage


(ii) Used for different memory
(iii) Used for different amount of memory
(iv) Determines the type and size of data associated with variables

3)
a. int c. string e. int g. bool

b. char d. string f. bool h. char


4)
a. reserved word h. reserved word

b. invalid i. invalid

c. valid j. valid

d. valid k. invalid

e. invalid l. invalid

f. valid m. valid

g. reserved word n. invalid

5) a. constant statement
b. mathematical expression statement

6)

Output code:
7)

Output code:
Programming Activities
1)

Output code:
2)

Output code:

2): Extra question (a), (b), (c), (d) & (e):

Output code:
3)

Output code:
4)

Output code:

You might also like