Question: Specification # 1 Main class: AverageValue Specification: Read in integers until the user enters - 1 . If there was at least one integer, show

Specification #1
Main class: AverageValue
Specification: Read in integers until the user enters -1. If there was at least one integer, show the average value.
Words-to-code table
Word Pattern or code
Read in integers
until the user enters -1.
If there was at least one integer
show
the average value.
Sample I/O
Value: 3
Value: 4
Value: 5
Value: 6
Value: -1
Average =4.5
Specification #2
Main class: CountVowels
Specification: Read in characters until the user enters a full stop '.'. Show the number of lowercase vowels.
Word Pattern or code
Read in characters
Until the user enters a full stop '.'
Show
the number of
lowercase vowels.
Sample I/O:
Character: t
Character: r
Character: e
Character: a
Character: s
Character: u
Character: r
Character: e
Character: .
Vowel count =4
Specification #3
Main class: MiddleAverage
Specification: Read in integers until the user enters -1. If there were more than 3 values, show the middle average excluding the biggest and smallest number and whether the sum of values is divisible by count. If there are less than four integers, print "No average to display".
Words-to-code table
Word Pattern or code
Read in integers
until the user enters -1.
If there were at least 3 values
show
the average excluding the biggest and smallest number.
show
whether sum is divisible by count
Sample I/O:
Enter an integer (-1 to exit): 1
Enter an integer (-1 to exit): 2
Enter an integer (-1 to exit): 3
Enter an integer (-1 to exit): 4
Enter an integer (-1 to exit): 6
Enter an integer (-1 to exit): -1
The middle average is: 3.0
The sum is not divisible by count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!