Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a Java program named MemoryCalculator Create the folder program2 In this folder create a folder name RAMerrors and place inside that folder a text

create a Java program named MemoryCalculator

Create the folder program2

In this folder create a folder name RAMerrors and place inside that folder a text file that has this information inside :

3CDAEFFAD

ABCDEFABC

7A0EDF301

1A00D0000

(Do not rename this file, it has no extension and should have no extension.)

Each record in this file represents the possible location of an error found in RAM. (Hint: One of them is not on one of the chips.)

Assume you have a computer with 4 gigs of RAM, each gig in a different memory chip, therefore you have 4 one gig RAM chips.

---------decimal--------------- HINT: RAM chip 0 contain addresses:

RAM chip 1 contain addresses: RAM chip 2 contain addresses: RAM chip 3 contain addresses:

HINT: RAM chip 0 contain addresses: RAM chip 1 contain addresses:

RAM chip 2 contain addresses:

RAM chip 3 contain addresses:

0 - 8,589,934,585 -

17,179,869,185 - 25,769,803,769 -

0 - 1,073,741,824 -

2,147,483,647 -

3,221,225,472 -

8,589,934,584 bits 17,179,869,184 bits

25,769,803,768 bits 34,359,738,368 bits

1,073,741,823 bytes 2,147,483,648 bytes

3,221,225,471 bytes

4,294,967,296 bytes

In the same folder, in terminal mode using an editor, create a Java program to do the following:

- Call the Java program

- MemoryCalculator.java

- Open the RAMerrors file - Read each record

- Print the RAM memory chip where the error is located for each record

*** CREATE YOUR OWN METHODS THAT WILL CONVERT HEX TO BINARY AND BINARY TO DECIMAL

*** DO NOT USE JAVA'S AUTOMATIC CONVERSION METHODS

Part 2 - Linux Shell Scripting - Worth 5 points. - Create a sh file named: program2.sh -

Set the permissions for this this *.sh file using this command to make it executable: chmod 755 *.sh - program2.sh should append your name and the current date and time to a NEW file called results.txt -program2.sh should then do the following:

How: - Ask the user to enter a number. - Verify that the number is between 1 and 50, inclusive. - If the number is not between 1 and 50, then keep asking the user to enter a number until it is valid. - Use a loop from 1 to the value entered by the user - Sum the results of all the included numbers, but do not include any output yet. - After the loop ends, display the sum and append it to the results.txt file on a new line as follows Sum of numbers is xxx

Zip your files into one file

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

Financial And Managerial Accounting Working Papers Volume I

Authors: Belverd E. Needles

7th Edition

061839365X, 978-0618393657

More Books

Students also viewed these Accounting questions