Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Programming principles and practice using C++: Chapter 7 - Bjarne Stroustrup
tailieunhanh - Lecture Programming principles and practice using C++: Chapter 7 - Bjarne Stroustrup
This chapter spends a lot of time of the structure and looks of code; that is, factors that affect comprehension and maintainability. It is a good idea to remind the students that often they are the maintainers (maybe of their own code, a few months after they first wrote it). A useful program is never finished: it will be ported, corrected, extended, etc. | Chapter 7 Completing a Program Bjarne Stroustrup Abstract Tokens and token streams Structs and classes Cleaning up the code Prompts Program organization constants Recovering from errors Commenting Code review Testing A word on complexity and difficulty Variables Stroustrup/Programming/2015 Completing the calculator Now wee need to Complete the implementation Token and Token_stream Get the calculator to work better Add features based on experience Clean up the code After many changes code often become a bit of a mess We want to produce maintainable code Stroustrup/Programming/2015 Token We want a type that can hold a “kind” and a value: struct Token { // define a type called Token char kind; // what kind of token double value; // used for numbers (only): a value }; // semicolon is required Token t; = '8'; // . (dot) is used to access members // (use ‘8’ to mean “number”) = ; Token u = t; // a Token behaves much like a . | Chapter 7 Completing a Program Bjarne Stroustrup Abstract Tokens and token streams Structs and classes Cleaning up the code Prompts Program organization constants Recovering from errors Commenting Code review Testing A word on complexity and difficulty Variables Stroustrup/Programming/2015 Completing the calculator Now wee need to Complete the implementation Token and Token_stream Get the calculator to work better Add features based on experience Clean up the code After many changes code often become a bit of a mess We want to produce maintainable code Stroustrup/Programming/2015 Token We want a type that can hold a “kind” and a value: struct Token { // define a type called Token char kind; // what kind of token double value; // used for numbers (only): a value }; // semicolon is required Token t; = '8'; // . (dot) is used to access members // (use ‘8’ to mean “number”) = ; Token u = t; // a Token behaves much like a built-in type, such as int // so u becomes a copy of t cout '8' '+' Stroustrup/Programming/2015 Token struct Token { // user-defined type called Token char kind; // what kind of token double value; // used for numbers (only): a value }; Token{‘+’}; // make a Token of “kind” ‘+’ Token{'8',}; // make a Token of “kind” ‘8’ and value A struct is the simplest form of a class “class” is C++’s term for “user-defined type” Defining types is the crucial mechanism for organizing programs in C++ as in most other modern languages a class (including structs) can have data members (to hold information), and function members (providing operations on the data) Stroustrup/Programming/2015 Token_stream A Token_stream reads characters, producing Tokens on demand We can put a Token into a Token_stream for later use A Token_stream uses a “buffer” to hold tokens we put back into it 1+2*3; empty Token_stream buffer: Input stream: For 1+2*3;, .
Ân Lai
80
31
ppt
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Không thể tạo bản xem trước, hãy bấm tải xuống
Tải xuống
TÀI LIỆU LIÊN QUAN
Principles of Programming Languages
166
128
0
Lecture Programming principles and practice using C++: Chapter 25 - Bjarne Stroustrup
36
83
0
Lecture Programming principles and practice using C++: Chapter 27 - Bjarne Stroustrup
44
117
0
Lecture Programming principles and practice using C++: Chapter 1, 2 - Bjarne Stroustrup
32
91
0
Lecture Programming principles and practice using C++: Chapter 7 - Bjarne Stroustrup
31
63
0
Lecture Programming principles and practice using C++: Chapter 8 - Bjarne Stroustrup
33
69
0
Lecture Programming principles and practice using C++: Chapter 9 - Bjarne Stroustrup
31
66
0
Lecture Programming principles and practice using C++: Chapter 10 - Bjarne Stroustrup
35
63
0
Lecture Programming principles and practice using C++: Chapter 11 - Bjarne Stroustrup
28
57
0
Lecture Programming principles and practice using C++: Chapter 12 - Bjarne Stroustrup
45
69
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461871
55
Giới thiệu :Lập trình mã nguồn mở
14
22685
61
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10901
530
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10072
446
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9535
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8294
1125
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8244
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7866
2220
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6696
253
Vật lý hạt cơ bản (1)
29
5777
85
TỪ KHÓA LIÊN QUAN
Kỹ thuật lập trình
Programming principles
Programming C++
Practical C++ programming
Programming languages
Completing a program
Token streams
programming experience
code programming
programming languages
computer programming
design tips
programming documentation
programming skills
the Ruby programming document
methods Ruby programming language
Embedded systems programming
Embedded systems
The C programming language
C++ interoperability
Programming hard
Language technicalities
Header files
Operator overloading
Output streams
Input streams
Numeric output
Customizing I O
Graphics model
Display model
Graphics classes
Interface classes
Graph class design
Class shape
Graphing functions
Classes defined
Graphical user interfaces
Layers of software
Vector revisited
Free store
Copy semantics
Representing vector
Pointer problems
Parameterization of algorithms
Associative containers
Standard algorithms
Software ideals
Language designers
Text processing
Application domains
Random numbers
Complex numbers
Testing GUIs
Design for testing
String I O
Integer I O
Language constructs
Language features
TÀI LIỆU MỚI ĐĂNG
Động cơ đốt trong và máy kéo công nghiêp tập 1 part 7
23
259
0
29-04-2024
Bibliography on Medieval Women, Gender, and Medicine 1980-2009
82
210
0
29-04-2024
beginning Ubuntu Linux phần 1
34
212
1
29-04-2024
Báo cáo nghiên cứu khoa học " KẾT QUẢ NGHIÊN CỨU BƯỚC ĐẦU VỀ THIÊN ĐỊCH CHÂN KHỚP TRÊN CÂY THANH TRÀ Ở THỪA THIÊN HUẾ "
7
175
0
29-04-2024
BÀI GIẢNG VỀ - MẠCH ĐIỆN II - Chương I: Phân tích mạch trong miền thời gian
38
141
0
29-04-2024
Đề tài: Tìm hiểu một số yêu cầu đặt ra với một phòng thu âm, để đảm bảo chất lượng âm thanh trong sản phẩm đa phương tiện
8
161
1
29-04-2024
GIÁO TRÌNH MÁY ĐIỆN KHÍ CỤ ĐIỆN - PHẦN I MÁY ĐIỆN - CHƯƠNG 1
46
131
2
29-04-2024
GIÁO TRÌNH VI XỬ LÝ 1 - CHƯƠNG 5. LẬP TRÌNH CHO VI ĐIỀU KHIỂN 80C51
23
107
1
29-04-2024
Kỹ thuật nuôi cá rồng part 5
7
128
0
29-04-2024
báo cáo hóa học:" Increased androgen receptor expression in serous carcinoma of the ovary is associated with an improved survival"
6
100
0
29-04-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7866
2220
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5760
1382
Ebook Chào con ba mẹ đã sẵn sàng
112
3770
1232
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5328
1136
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8294
1125
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3504
643
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10901
530
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3689
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4060
516
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4133
480
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.