Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Generics enable you to specify the exact type that will be stored in a collection and give you the benefits of compile-time type checking—the compiler issues error messages if you use inappropriate types in your collections. Once you specify the type stored in a generic collection, any reference you retrieve from the collection will have that type.

Instructions

Write a program that inserts 25 random integers from 0 to 100 in order into Java’s LinkedList object (you must use Java’s LinkedList class to get any credit for this assignment).

 

The program must:

  • sort the elements,
  • then calculate the sum of the elements, and
  • calculate the floating-point average of the elements.

 

For this assignments make sure that your screen shot(s) show your program running and that your runtime display shows your random list, sorted list, sum of the elements, and average of the elements.  You only get credit for what you demonstrate.  Below is a sample screen shot.  Your output doesn’t have to look exactly like this but you should display the unsorted list, the sorted list, the sum, and the average to get full credit.

 

 

 

Expert Solution
Check Mark
Step 1

Introduction

Java programming:

 Java is cross-platform, meaning it can run on any operating system, and is relatively easy to learn. It is a versatile language that has powerful tools for creating efficient and secure applications. It is used in a variety of applications, from desktop applications to web development, mobile development, and embedded systems. Java is popular for its scalability and support for a wide range of libraries and tools.

 

To find:

Program that inserts 25 random integers from 0 to 100.

Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education