
DCS1101 - Week 12 (Structures)
Presentation
•
Computers
•
University
•
Practice Problem
•
Easy
Yasmin Basiran
Used 1+ times
FREE Resource
30 Slides • 8 Questions
1
2
Learning Contents
Introduction to structures
Structure syntaxes
The application of syntaxes
3
4
5
6
7
Multiple Choice
A structure in C++ is best described as:
8
Multiple Choice
Which keyword is used to declare a structure?
9
Multiple Choice
A structure can contain:
Only integers
Only floating numbers
Any combination of data types
Only characters
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Multiple Choice
What is the output of the following code?
struct Box { int w; int h; };
int main() {
Box b = {5, 8};
cout << b.w + b.h;
}
27
Multiple Choice
What is the error of the following?
struct Person {
int age;
string name;
};
int main() {
cout << Person.age;
}
28
Multiple Choice
What is the output of this?
struct Num { int n; };
int main() {
Num x = {7};
Num y = x;
y.n = 20;
cout << x.n;
}
29
Multiple Choice
What is the error of this code?
struct Item {
string name;
float price;
};
Item item("Soda", 2.5);
30
Previous Topic | Relation to Structures |
|---|---|
Variables | Structures contain multiple variable types. |
Arrays | Structures allow arrays as members, and arrays of structures. |
Functions | Structures can be passed to functions by value or reference. |
Loops | Often used to process structure arrays (for, while). |
Selection (if/switch) | To compare structure members (e.g., highest price). |
File Processing | Structures store data that can later be written to files. |
31
Real Programming Uses
To group different info about one item (student, car, book).
To create arrays of objects easily.
To pass related data into functions without many parameters.
To create more complex data types before learning classes/objects.
32
Real Programming Uses
Games (player stats)
Finance apps (transaction records)
University systems (student database)
Inventory systems (products)
File handling records
33
34
The first inventory systen
35
Material Requirements Planning (MRP) – Late 1960s
Developed by IBM and large manufacturing companies.
Used on early mainframe computers.
Helped factories track inventory, production schedules, and materials needed.
Companies like Black & Decker were among the first major adopters (1964).
36
Timeline for MRP
Year | System | Notes |
|---|---|---|
Pre-1960s | Manual, paper forms | No software; physical cards & ledgers. |
1960s | MRP (Material Requirements Planning) | First computerized inventory system on mainframes. |
1970s | MRP II (Manufacturing Resource Planning) | Added scheduling, capacity planning. |
1990s | ERP (Enterprise Resource Planning) | Integrated inventory with HR, finance, logistics (SAP, Oracle). |
2000s–Today | Cloud-based inventory tools | QuickBooks, Zoho Inventory, Odoo, etc. |
37
Open Ended
Imagine your college needs a system to keep track of student attendance.
How could structures and functions be used together to simplify the program design?
38
Thank you!
Show answer
Auto Play
Slide 1 / 38
SLIDE
Similar Resources on Wayground
34 questions
Unit 103- 16 Quiz
Presentation
•
KG - University
33 questions
Ready for IELTS Unit 3 Part 2
Presentation
•
University
31 questions
APTIS Speaking - Part 3
Presentation
•
University
32 questions
Loop 10 c1 cleft sentences
Presentation
•
KG - University
30 questions
Session 2
Presentation
•
KG - University
29 questions
LTP Aula 01
Presentation
•
University
38 questions
Lecture 2-DSTR
Presentation
•
University
35 questions
Feminism
Presentation
•
10th - 12th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade
Discover more resources for Computers
55 questions
Post Malone Addtion (Tres)
Quiz
•
12th Grade - University
20 questions
Disney Trivia
Quiz
•
University
50 questions
AP Biology Exam Review 2017
Quiz
•
11th Grade - University
24 questions
5th Grade Math EOG Review
Quiz
•
KG - University
12 questions
Star Wars Trivia - Easy
Quiz
•
KG - University
215 questions
8th Physical Science GA Milestones Review
Quiz
•
KG - University
40 questions
Famous Logos
Quiz
•
7th Grade - University
14 questions
(5-3) 710 Mean, Median, Mode & Range Quick Check
Quiz
•
6th Grade - University