TOPICS: Data and Expressions MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM.  Write an application that prompts for and reads the numerator and denominator of a fraction as integers, then displays the decimal equivalent of the fraction. Hint: This requires casting from integer to double before dividing. Testing: Submit testing exhibits using the following inputs: 0, 1 giving 0.0; 1, 2 giving 0.5; 3, 8 giving 0.375; 2, 3 giving 0.666...; 25, 7 giving 3.57128...

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

TOPICS: Data and Expressions

MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM. 

  1. Write an application that prompts for and reads the numerator and denominator of a fraction as integers, then displays the decimal equivalent of the fraction.

    Hint: This requires casting from integer to double before dividing.

    Testing: Submit testing exhibits using the following inputs:
    0, 1 giving 0.0; 1, 2 giving 0.5; 3, 8 giving 0.375; 2, 3 giving 0.666...; 25, 7 giving 3.57128...

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage