Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 ( 16 marks) A file named history.txt contains unknown number of laptop records (maximum no. of records is 50). Each line in the

image text in transcribed
Question 5 ( 16 marks) A file named history.txt contains unknown number of laptop records (maximum no. of records is 50). Each line in the file consists of laptop model (string), memory (integer), and CPU speed (float). Write a program that reads the data from the file into 3 parallel arrays. Your program should display the following (see screen output): The number of laptops. Laptop information (laptop model, memory and Speed) for all laptops in the file. The average memory of all laptops The laptop model with the lowest CPU speed. history.txt (Input file) Screen Output There are 24 laptops in the file. HP Sony Lenova 8 4 2 3.2 1.8 1.4 Model HP Memory 8 4 2 Speed 3.2 1.8 1.4 Sony Lenova Toshiba 6 2.2 Question 5 ( 16 marks) A file named history.txt contains unknown number of laptop records (maximum no. of records is 50). Each line in the file consists of laptop model (string), memory (integer), and CPU speed (float). Write a program that reads the data from the file into 3 parallel arrays. Your program should display the following (see screen output): The number of laptops. Laptop information (laptop model, memory and Speed) for all laptops in the file. The average memory of all laptops The laptop model with the lowest CPU speed. history.txt (Input file) Screen Output There are 24 laptops in the file. HP Sony Lenova 8 4 2 3.2 1.8 1.4 Model HP Memory 8 4 2 Speed 3.2 1.8 1.4 Sony Lenova Toshiba 6 2.2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

What will ongoing support to teachers look like?

Answered: 1 week ago

Question

Are layers of support identified for students who struggle?

Answered: 1 week ago