1
Student Name: __________________
Class and Section __________________
Total Points (20 pts) __________________
Due: September 20, Monday, 2012 before the class
Project: Proper Fractions, Improper Fractions, and
Mixed Fractions
CSCI 1301 Introduction to Programming Principles
Armstrong Atlantic State University
Problem Description:
Proper fractions, improper fractions, and mixed
fractions are defined at
number and determines whether it is a proper
fraction and improper fraction. For an improper
fraction number, display its mixed fraction in the
form of a + b / c if b % c is not zero; otherwise,
display only the integer.
Here are sample runs of the program:
Sample 1:
Enter a numerator: 16
Sample 2:
Enter a numerator: 6
Enter a denominator: 7
6 / 7 is a proper fraction
Sample 3:
Analysis:
(Describe the problem including input and output in your own words.)
2
Design:
(Describe the major steps for solving the problem.)
Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)
Name the program Exercise03_01Extra
Testing: (Describe how you test this program)
Submit the following items:
1. Print this Word file and Submit to me before the class on the due day
2. Compile, Run, and Submit to LiveLab (you must submit the program regardless
whether it complete or incomplete, correct or incorrect)
3
Code Solution:
import java.util.Scanner;
public class Exercise03_01Extra {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);