Welcome to AssignmentCache!

PRG/421 Week 4 Java 4.5 LAB: What order? (generic methods)

Availability: In stock

$7.00

Quick Overview

PRG/421 Week 4 Java 4.5 LAB: What order? (generic methods)


Define a generic method called checkOrder() that checks if four items are in ascending, neither, or descending order. The method should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order.
The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, Strings characters, or doubles


Ex. If the input is
bat hat mat sat
63.2 96.5 100.1 123.5


the output is
Order: -1
Order: -1

PRG421 Week 4 Java 4.5 LAB What order (generic methods)

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

  • PRG421 Week 4 Java 4.5 LAB What order (generic methods)
$7.00

Details

PRG/421 Week 4 Java 4.5 LAB: What order? (generic methods)

Define a generic method called checkOrder() that checks if four items are in ascending, neither, or descending order. The method should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order.
The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, Strings characters, or doubles

Ex. If the input is
bat hat mat sat
63.2 96.5 100.1 123.5

the output is
Order: -1
Order: -1

Additional Information

Special Price $3.00

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.

[profiler]
Memory usage: real: 18350080, emalloc: 17974320
Code ProfilerTimeCntEmallocRealMem