Question: Activity 2.2: Operators, Operations & Consta In this activity, you will use your knowledge of both Chapter 1 and 2 materials to analyze and understand

 Activity 2.2: Operators, Operations & Consta In this activity, you willuse your knowledge of both Chapter 1 and 2 materials to analyzeand understand the given code. Make sure to finish the activity withoutusing IDE first. You can use IDE after hand tracing the code.Content Learning Objectives After completing this activity, students should: Get familiar withmathematical and relational operators Learn about variables, data types, and data types

Activity 2.2: Operators, Operations & Consta In this activity, you will use your knowledge of both Chapter 1 and 2 materials to analyze and understand the given code. Make sure to finish the activity without using IDE first. You can use IDE after hand tracing the code. Content Learning Objectives After completing this activity, students should: Get familiar with mathematical and relational operators Learn about variables, data types, and data types with operators Get familiar with writing programs that solve simple mathematical problems. Process Skills Goals After completing this activity, students should make progress towards: Analyzing skills and ability to hand trace code Section 1: Hand Tracing Code Check Point: 30 Minutes A program is given to you below. Go through each line and describe what it does by writing notes in the margins. Add necessary data type casting to the lines (The program below does not compile otherwise). Next, fill the table in page #2, with the answer to the corresponding inline comment question as well as the corresponding inputs for dx and dy. import java.utusanne public class Basiscalculator public static void main(stringil xos Scanner input new Scanner system, ain) Hatan Antxi double , dx, float Swalewe dy Input Dexinouble BOROWE Prompt the user for Svatebut.print 'Ent dx input nextBoybi extrouble 0 No OS Ub Systest. eut Ra y ti He putpuente dz = dx + dy 22 Xy Sat 2 NONNNNN 279 the out n/ana they the sail Vous ne shell without SUERE Line #18 Line #20 Line #26 Line 28 Line 131 Ling #29 BUV 78 words O NLINE 2 Line #18 Line #20 Line #26 Line #28 Line #29 Line #31 3.456 3.56 712345678 0.12345678 776 words English (United States) JAN POTES 210.00 4)@ 3 22 Section 2: Analyzing and Completing Code Check Point: 15 Minutes Parts of a program are given to you below. You must now read through and understand this code - what is the goal of the program? Afterwards, fill in the blanks so that the program complete. * @author: description: calculate the sales &date: import public class Satsacax public static void main (String Scanner input final DAX RATE 01075; System.DuPrintia Plense input your total double billigt NINA SAX doubla taistuotte Syashion steneturi Tha Tea unt you need to pay Section 3: Analyze, Design and Complete the Code Check Point: 10 Minutes Analyze the nearam to find out what Mariah ane.created what onerations are ma Section 3: Analyze, Design and Complete the Code Check Point: 10 Minutes Analyze the program to find out what variables are created and what operations are made. Afterwards, answer the questions, Code A: WW import javauttoscanos public class Ises public static void main string i Bob Scanner input new Seanner(System.in) final double FEE RATE 4.5 FEE RATB-1.2, 83583s out printia (MPEE RAIS E 4+ BER Observe the code above and answer the following Questions: 1. What is the data type of FEE_RATE? 2. Is FEE RATE a constant variable or not? 3. Do vou think that the code above will work? Why/Why not? sh (United States) Observe the code above and answer the following Questions: 1. What is the data type of FEE_RATE? 2. Is FEE_RATE a constant variable or not? 3. Do you think that the code above will work? Why/Why not? 4. Type the code above in Eclipse and try to run it. Does it compile? Why/Why not? Code B: public class Test public static void main (String arge) int numl= 5; int num2=2; int total = numium2, Svetom.Quturintin("total + total) Observe the code above and answer the following Questions: What are the data types of numi and num2? 2. What do you think the program will display? MAI B. Type the code above in Eclipse and try to run it. What does it display? Briefly explain how the answer was calculated. States Activity 2.2: Operators, Operations & Consta In this activity, you will use your knowledge of both Chapter 1 and 2 materials to analyze and understand the given code. Make sure to finish the activity without using IDE first. You can use IDE after hand tracing the code. Content Learning Objectives After completing this activity, students should: Get familiar with mathematical and relational operators Learn about variables, data types, and data types with operators Get familiar with writing programs that solve simple mathematical problems. Process Skills Goals After completing this activity, students should make progress towards: Analyzing skills and ability to hand trace code Section 1: Hand Tracing Code Check Point: 30 Minutes A program is given to you below. Go through each line and describe what it does by writing notes in the margins. Add necessary data type casting to the lines (The program below does not compile otherwise). Next, fill the table in page #2, with the answer to the corresponding inline comment question as well as the corresponding inputs for dx and dy. import java.utusanne public class Basiscalculator public static void main(stringil xos Scanner input new Scanner system, ain) Hatan Antxi double , dx, float Swalewe dy Input Dexinouble BOROWE Prompt the user for Svatebut.print 'Ent dx input nextBoybi extrouble 0 No OS Ub Systest. eut Ra y ti He putpuente dz = dx + dy 22 Xy Sat 2 NONNNNN 279 the out n/ana they the sail Vous ne shell without SUERE Line #18 Line #20 Line #26 Line 28 Line 131 Ling #29 BUV 78 words O NLINE 2 Line #18 Line #20 Line #26 Line #28 Line #29 Line #31 3.456 3.56 712345678 0.12345678 776 words English (United States) JAN POTES 210.00 4)@ 3 22 Section 2: Analyzing and Completing Code Check Point: 15 Minutes Parts of a program are given to you below. You must now read through and understand this code - what is the goal of the program? Afterwards, fill in the blanks so that the program complete. * @author: description: calculate the sales &date: import public class Satsacax public static void main (String Scanner input final DAX RATE 01075; System.DuPrintia Plense input your total double billigt NINA SAX doubla taistuotte Syashion steneturi Tha Tea unt you need to pay Section 3: Analyze, Design and Complete the Code Check Point: 10 Minutes Analyze the nearam to find out what Mariah ane.created what onerations are ma Section 3: Analyze, Design and Complete the Code Check Point: 10 Minutes Analyze the program to find out what variables are created and what operations are made. Afterwards, answer the questions, Code A: WW import javauttoscanos public class Ises public static void main string i Bob Scanner input new Seanner(System.in) final double FEE RATE 4.5 FEE RATB-1.2, 83583s out printia (MPEE RAIS E 4+ BER Observe the code above and answer the following Questions: 1. What is the data type of FEE_RATE? 2. Is FEE RATE a constant variable or not? 3. Do vou think that the code above will work? Why/Why not? sh (United States) Observe the code above and answer the following Questions: 1. What is the data type of FEE_RATE? 2. Is FEE_RATE a constant variable or not? 3. Do you think that the code above will work? Why/Why not? 4. Type the code above in Eclipse and try to run it. Does it compile? Why/Why not? Code B: public class Test public static void main (String arge) int numl= 5; int num2=2; int total = numium2, Svetom.Quturintin("total + total) Observe the code above and answer the following Questions: What are the data types of numi and num2? 2. What do you think the program will display? MAI B. Type the code above in Eclipse and try to run it. What does it display? Briefly explain how the answer was calculated. States

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!