Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PartA.java darr # PartB.java darr Course Concept ( s ) Covered 5 Primitive Data Types Object References Arithmetic Operators Using Objects Instructions Create a new
PartA.java darr #
PartB.java darr
Course Concepts Covered
Primitive Data Types
Object References
Arithmetic Operators
Using Objects
Instructions
Create a new project in jdoodle called DataAndOperators and upload the three supporting files into it Once you have completed the lab, download the project, rename the zip file as WDataAndOperators and upload in Canvas.
Part A
You will need the code from PartA.java to complete this part of the lab. Make PartA as the Start File to run it
Answer the following questions before compiling and running the code:
What should the output be if is entered as the radius use the calculator to determine this
Can you identify the need for the following statement:
import java.lang.Math.;;
Execute the code.
Was the output what you expected? Is the output correct?
This program is producing incorrect output because of a problem associated with types. Can you identify and fix the problem so that the output is correct?
After fixing the code, compile and execute it so you know it is running correctly.
Part B
You will need the code from PartB.java to complete this part of the lab. Make PartB as the Start File to run it
Without running the code, can you determine what the output will be if you enter for b and for b What if you enter for b and for bmore super bonus points if you answer this correctly
Execute the code to see if your answers were correct. If not, can you identify why not?
Can you fix the code so that it produces the value when you enter and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started