TAILIEUCHUNG - Lecture An introduction to Object-Oriented Programming with Java - Chapter 3: Numerical data

After you have read and studied this chapter, you should be able to: Select proper types for numerical data; write arithmetic expressions in Java; evaluate arithmetic expressions, using the precedence rules; describe how the memory allocation works for objects and primitive data values; | Chapter 3 Numerical Data Chapter 3 Objectives After you have read and studied this chapter, you should be able to Select proper types for numerical data. Write arithmetic expressions in Java. Evaluate arithmetic expressions, using the precedence rules. Describe how the memory allocation works for objects and primitive data values. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Objectives, cont. After you have read and studied this chapter, you should be able to Write mathematical expressions, using methods in the Math class. Use the GregorianCalendar class in manipulating date information such as year, month, and day. Use the DecimalFormat class to format numerical data. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Objectives, cont. After you have read and studied this chapter, you should be able to Convert input string values to numerical data. Apply the incremental development technique in writing programs. (Optional) Describe how integers and real numbers are represented in memory. Input data by using and output data using . ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Variables To compute the sum and the difference of x and y in a program, we must first declare what kind of data will be assigned to them. After we assign values to them, we can compute their sum and difference. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Variables When a declaration, such as int x, y; is made, memory locations to store data values for x and y are allocated. These memory locations are called variables, and x and y are the names we associate with the memory locations. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Variables A variable has three properties: A memory location to store the value. The type of data stored in the memory location. The name used .

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.