0% found this document useful (0 votes)
21 views1 page

Fraction

Uploaded by

xabc0983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Fraction

Uploaded by

xabc0983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Type: Short Assignment

Code: Lab2-PRO192

LAB211- Assignment LOC:


Slot(s):
80
1

Title
Handling fractions program.

Program Specifications
Design a program that allows users to input the number of list fractions. Generate random integer in number
range input. Display sorted fractions list.
Fraction class contains numerator, denominator attributes, constructor, getter/setter methods for each
attribute.
All fractions are stored in a Array list.

Function details:
1. Display a screen to prompt users to input a positive integer number.
o Users run the program, display a screen to ask users to enter a positive integer number.

o Users input a positive integer number. Then, perform Function 2.

2. Display:
o Generate list random fractions (with number of element that user just inputted).

o Sort array fraction list ascending and display.

o Display sum of fractions in list by minimalist fraction form.

Expectation of User interface:

Guidelines:
- Use Random class to create a random number.

You might also like