Operations All instructions in this section should be carried out in the class PrimitiveOperations, in the main method, and must be in the respective order Declare and initialize two variables, an integer type (byte, short, int, or long) and a floating-point value (float or double). O The names and values of the variables can be your choice, both for this step and all other steps. o Make sure that the numbers you choose can be stored within the respective primitive type you choose. O Print each of these values out on their own line using System.out.println(). Multiple these two variables together and assign the product to a new variable, ensuring that no data is lost (i.e., when multiplying 5 and 3.5, the answer should be 17.5). o Print out this new value. Use casting to convert the integer from the first step to a floating-point value and store that in another new variable. o Print out the value. Use casting to convert the floating-point value from the first step to an integer type and store that in a new variable. O Print out the value. Shifting focus, declare a char variable and assign an uppercase letter to it. O Print out this value. Using a numerical operation, change the letter to the same letter, but in lowercase. o Use a numerical operation- do not simply reassign the variable. O Hint: You may want to review a table of ASCII values for this part, and you will likely have to use casting to get this to work.
Operations All instructions in this section should be carried out in the class PrimitiveOperations, in the main method, and must be in the respective order Declare and initialize two variables, an integer type (byte, short, int, or long) and a floating-point value (float or double). O The names and values of the variables can be your choice, both for this step and all other steps. o Make sure that the numbers you choose can be stored within the respective primitive type you choose. O Print each of these values out on their own line using System.out.println(). Multiple these two variables together and assign the product to a new variable, ensuring that no data is lost (i.e., when multiplying 5 and 3.5, the answer should be 17.5). o Print out this new value. Use casting to convert the integer from the first step to a floating-point value and store that in another new variable. o Print out the value. Use casting to convert the floating-point value from the first step to an integer type and store that in a new variable. O Print out the value. Shifting focus, declare a char variable and assign an uppercase letter to it. O Print out this value. Using a numerical operation, change the letter to the same letter, but in lowercase. o Use a numerical operation- do not simply reassign the variable. O Hint: You may want to review a table of ASCII values for this part, and you will likely have to use casting to get this to work.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY