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
icon
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.
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
steps

Step by step

Solved in 6 steps with 3 images

Blurred answer
Knowledge Booster
Data members
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.
Similar questions
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education