design types program, it may display the following messages: Problems @ Javadoc Declaration Console X Data Hierarchy Conversion [Java Application] C:\Program Files\Eclipse Foundation\b 1. This is to show assignment conversion: Enter an int for a: 3 Converted an int to a double by assignment. int a is 3 double b is 3.0 2. This is to show promotion coversion: Enter an int for c: 5 Enter a double for d: 2.0 Assign c/d to e. int c is 5 double d is 2.0 output e is 2.5 3. This is to show casting conversion: Enter a double for f: 5.7 Enter an int for g: 2 Assign f/g to h. double f is 5.7 int g is 2 output h is 2 When you run our program, the numbers must be typed from input but not be assigned in your program. You can type the same numbers as in the example or you may type other numbers, but please display all the three data conversions.
design types program, it may display the following messages: Problems @ Javadoc Declaration Console X Data Hierarchy Conversion [Java Application] C:\Program Files\Eclipse Foundation\b 1. This is to show assignment conversion: Enter an int for a: 3 Converted an int to a double by assignment. int a is 3 double b is 3.0 2. This is to show promotion coversion: Enter an int for c: 5 Enter a double for d: 2.0 Assign c/d to e. int c is 5 double d is 2.0 output e is 2.5 3. This is to show casting conversion: Enter a double for f: 5.7 Enter an int for g: 2 Assign f/g to h. double f is 5.7 int g is 2 output h is 2 When you run our program, the numbers must be typed from input but not be assigned in your program. You can type the same numbers as in the example or you may type other numbers, but please display all the three data conversions.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
![Please design a problem to show the three types of data conversions. For example, if you run the
program, it may display the following messages:
Problems @ Javadoc Declaration Console X Data Hierarchy
<terminated> Conversion [Java Application] C:\Program Files\Eclipse Foundation\b
1. This is to show assignment conversion:
Enter an int for a: 3
Converted an int to a double by assignment.
int a is 3
double b is 3.0
2. This is to show promotion coversion:
Enter an int for c: 5
Enter a double for d: 2.0
Assign c/d to e.
int cis 5
double d is 2.0
output e is 2.5
3. This is to show casting conversion:
Enter a double for f: 5.7
Enter an int for g: 2
Assign f/g to h.
double f is 5.7
int g is 2
output h is 2
When you run our program, the numbers must be typed from input but not be assigned in your
program. You can type the same numbers as in the example or you may type other numbers, but
please display all the three data conversions.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F988c66ad-2fab-4561-a552-cd296d0e4f50%2F96d0f666-db00-4439-a0ef-00b7ef7b2c96%2F4dugd82_processed.png&w=3840&q=75)
Transcribed Image Text:Please design a problem to show the three types of data conversions. For example, if you run the
program, it may display the following messages:
Problems @ Javadoc Declaration Console X Data Hierarchy
<terminated> Conversion [Java Application] C:\Program Files\Eclipse Foundation\b
1. This is to show assignment conversion:
Enter an int for a: 3
Converted an int to a double by assignment.
int a is 3
double b is 3.0
2. This is to show promotion coversion:
Enter an int for c: 5
Enter a double for d: 2.0
Assign c/d to e.
int cis 5
double d is 2.0
output e is 2.5
3. This is to show casting conversion:
Enter a double for f: 5.7
Enter an int for g: 2
Assign f/g to h.
double f is 5.7
int g is 2
output h is 2
When you run our program, the numbers must be typed from input but not be assigned in your
program. You can type the same numbers as in the example or you may type other numbers, but
please display all the three data conversions.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 6 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education