TAILIEUCHUNG - Lecter Java: Program design - Chapter 5: Decisions

In this chapter, we consider both the if and switch conditional constructs that control whether a statement list is executed. Because the if constructs use logical expressions to determine their course of action, we begin with logical expressions. | Decisions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Background Our problem-solving solutions so far have the straight-line property They execute the same statements for every run of the program public class DisplayForecast // main(): application entry point public static void main(String[] args) { ("I think there is a world"); (" market for maybe five "); ("computers. “); (" Thomas Watson, IBM, “); ("1943.“); } } Background For general problem solving we need more capabilities The ability to control which statements are executed The ability to control how often a statement is executed We will concentrate first on controlling which statements are executed Java provides the if and switch conditional constructs to control whether a statement list is executed The if constructs use logical expressions to determine their course of action Examination begins .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.