Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project name A345 Package name a3 Class name a3 Write statements that perform the following operations with the variables a, b, and c. a. Adds

Project name A345

Package name a3

Class name a3

Write statements that perform the following operations with the variables

a, b, and c.

a. Adds 2 to a and stores the result in b

b. Multiplies b times 4 and stores the result in a

c. Divides a by 3.14 and stores the result in b

d. Subtracts 8 from b and stores the result in a

e. Stores the character K in c

f. Stores the Unicode code for B in c

2. Convert the following pseudocode to Java code. Be sure to declare the appropriate variables.

Store 172.5 in the force variable.

Store 27.5 in the area variable.

Divide area by force and store the result in the pressure variable.

Display the contents of the pressure variable.

3. Write a program that declares the following:

a String variable named name

an int variable named age

a double variable named annualPay

Store your age, name, and desired annual income as literals in these variables. The program

should display these values on the screen in a manner similar to the following:

My name is Joe Mahoney, my age is 26 and

I hope to earn $100000.0 per year.

please write in java and according to above instructions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago