The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 4 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Part 1 - Java program named MemoryCalculator - Worth 5 points
    In your Ubuntu VM (virtual machine), using terminal mode ONLY, do the following:
   Â
    Create the folder program2
   Â
    In this folder place the text file located on my faculty website in Module 2 called RAMerrors (Do not rename this file, it has no extension.)
   Â
    Each record in this file represents the location of an error found in RAM
   Â
    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:             0 - 8,589,934,584 bits
          RAM chip 1 contain addresses: 8,589,934,585 - 17,179,869,184 bits
          RAM chip 2 contain addresses: 17,179,869,185 - 25,769,803,768 bits
          RAM chip 3 contain addresses: 25,769,803,769 - 34,359,738,368 bits
         Â
         Â
    HINT: RAM chip 0 contain addresses:            0 - 1,073,741,823 bytes
          RAM chip 1 contain addresses: 1,073,741,824 - 2,147,483,648 bytes
          RAM chip 2 contain addresses: 2,147,483,647 - 3,221,225,471 bytes
          RAM chip 3 contain addresses: 3,221,225,472 - 4,294,967,296 bytes
Â
                              Â
    In the same folder, in terminal mode using an editor, build a Java program
    to do the following:
    - Call the Java program - MemoryCalculator
    - Open the RAMerrors text fileÂ
    - Read each record
    - Print the RAM memory chip where the error is located for each record
Â
    *** BUILD 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.
  - NOT using editors, build a sh file named: program2.sh
   - Set this *.sh file to: chmod 755 *.sh
   - NOT using editors, append your name, current date and time to a NEW file called results.txt
   - NOT using editors, append to the *.sh file, all the commands needed so that when you execute your sh file,
    this file will produce the following:
   Â
  How:
  - Ask the user to enter a number.
  - Verify that the number is between 1 and 100.
  - If the number is not between 1 and 100, then keep asking the user to enter a number until it is valid.
  - Use a for loop from 1 to the value entered by the user
  - Sum the results of calculating each number mod 5
  - After the for loop ends, display the sum of all previous results and
    append it to the results.txt file as follows
    Sum of numbers is xxx
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly