Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE WRITE IN JAVA Irite a class named Shorts that performs all of the following tasks: - (12 points) Prompts the user to enter a

PLEASE WRITE IN JAVA image text in transcribed
Irite a class named Shorts that performs all of the following tasks: - (12 points) Prompts the user to enter a whole number. - ( 12 points) Saves the value entered by the user in a variable of type int named genres. - (12 points) Calculates the value of 6n+46+173n+4189 where n is the value stored in the variable genres. - (12 points) Saves the calculated value in a variable of type double named issues. - (12 points) Prints the value of the variables genres and issues using the format shown in the sample runs below. The value of issues should be displayed to 4 places and using commas as thousand separators. Here are some sample runs of the program: Sample Run 1 Enter a whole number. 8 The value of genres is 8 and the value of issues is 491.6040. Sample Run 2 Enter a whole number. 856 The value of genres is 856 and the value of issues is 5,063.7155

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

Students also viewed these Databases questions