La Trobe University OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 1 of 22 Department of Computer Science and Information Technology La Trobe...

i had attached the file


La Trobe University OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 1 of 22 Department of Computer Science and Information Technology La Trobe University CSE1OOF/4OOF Semester 1, 2020 Assignment Part B First and Final date for SUBMISSION Tuesday 12th May at 10.00 am Delays caused by computer downtime cannot be accepted as a valid reason for a late submission without penalty. Students must plan their work to allow for both scheduled and unscheduled downtime. There are no days late or extensions on this assignment as execution test marking will begin on the 13th This is an individual Assignment. You are not permitted to work as a Pair Programming partnership or any other group when writing this assignment. Copying, Plagiarism: Plagiarism is the submission of somebody else’s work in a manner that gives the impression that the work is your own. The Department of Computer Science and Information Technology treats academic misconduct seriously. When it is detected, penalties are strictly imposed. Refer to the subject guide for further information and strategies you can use to avoid a charge of academic misconduct. Submission Details: Full instructions on how to submit electronic copies of your source code files from your latcs8 account are given at the end. If you have not been able to complete a program that compiles and executes containing all functionality, then you should submit a program that compiles and executes with as much functionality as you have completed. (You may comment out code that does not compile.) Note you must submit electronic copies of your source code files using the submit command on latcs8. Ensure you submit the required file. For example, the file HexEditor.java would be submitted with the command: > submit OOF HexEditor.java PLEASE NOTE: While you are free to develop the code for this progress check on any operating system, your solution must run on the latcs8 system. Marking Scheme: This assignment is worth 10% of your final mark in this subject. Implementation (Execution of code) 90%, explanation of code 10% You may be required to attend a viva voce (verbal) assessment (to be used as a weighting factor on the final mark). Do NOT use the LMS to submit your files, use latcs8 only OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 2 of 22 Return of Mark sheets: The face to face execution test marking in the lab (constitutes a return of the assignment mark, subject to the conditions on the last page of this document. Please note carefully: The submit server will close exactly 10:00 am on the due date. After the submit server has closed, NO assignments can be accepted. Please make sure that you have submitted all your assignment files before the submit server closes. There can be NO extensions or exceptions. Your assignment will be marked in your normal lab just after the due date. If you cannot attend the lab you have signed up for on Allocate, please email [email protected] to arrange another time. Marking scheme: 90% for the code executing correctly 10%, you will be asked to explain (and / or alter) parts of your code. You must attend the lab you have signed up for on Allocate. Non-attendance at the lab you have signed up for on Allocate will also result in your assignment being awarded 0, except as detailed below. mailto:[email protected] OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 3 of 22 Please also note carefully that whilst we encourage innovation and exploring java beyond what has been presented in the subject to date, above all, we encourage understanding. Code and techniques that are outside the material presented will not be examined, of course. You are free to solve the Tasks below in any way, with one condition. Any assignment that uses code that is outside what has been presented to this point must be fully explained at the marking execution test. Not being able to fully explain code outside what has been presented in the subject so far will result in the assignment being awarded a mark of 0, regardless of the correctness of the program. Submitting an assignment with code outside what has been presented so far and not attending the marking execution test will result in an automatic mark of 0, regardless of the correctness of the submission. All assignments in OOF are marked, in the lab, in an execution test. This means that we mark running code. Your code must compile and display a result to the screen. Regrettably, we don't have the time or resources to look at code. The smallest amount of code that produces and displays a correct result will gain more marks than lots of code that doesn't compile, run or display something to the screen. Using code not taught in OOF - READ THIS How this assignment is marked OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 4 of 22 Working with files. It is important for any good programmer to understand the contents of a file and how files work. So far in OOF we have looked at text files, that is files that can be opened in Vim or Notepad. However, most files you encounter are not text files, they are binary files. Think about things like PNG ZIP or MP3, none of these can open opened in Notepad or Vim. The .class files that javac produces are an example of a binary file. Try opening them in Vim, are they nice to read? Since you cannot view binary files using a text editor, we need a special tool to look at the internals of a file. This is known as a Hex Editor and is a valuable tool for any programmer. Below is an example of a Hex Editor for windows. Notice that it has two panels, the left side is the bytes of the file in hexadecimal. The right side is the same data but shown as ASCII characters. You may notice that many of the bytes are not valid ASCII characters and are replaced with placeholder characters or spaces. The far-left panel is the address of the first byte of each row. The highlighted row “60” indicates that the first byte of that row (value A7) has address 60. Remember though that all these numbers are in hexadecimal, so “60” in hex is equal to “96” in decimal. Typically, programmers will prefix a number with “0x” to indicate that it is a hex number. The highlighted cell (value “2F”) is at address 0x64, remember we count from zero. OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 5 of 22 Your Task You need to implement a basic hex editor in Java that will run inside the PuTTY window. A hex editor is a tool that you use throughout your programming career, you may find yourself using this tool long after you finish OOF. So, take the opportunity to design it well. Your hex editor will be able to: 1) Open a file of any size and not crash. 2) Show both hex and ASCII representation of the data in a neat well formatted grid. 3) Be able to jump to a given address using a command. 4) Be able to get and set the value of a byte at a given address using a command. When you run the program, you will provide it with the name of a file. Then the program will show the first 256 bytes of the file, then prompt the user for a command. The valid commands will be: 1) “exit” to exit the program. 2) “goto” to select a specific byte. 3) “jump” to select a byte relative to the currently selected byte. 4) “set” to set a byte 5) “hex” to switch to hex view. 6) “ascii” to switch to ASCII view (more on this later) 7) “truncate” to delete all bytes after the selected byte. 8) “next” to move to the next page of bytes 9) “previous” to move to the previous page of bytes. 10) “find” to find a string in the data. Tip: only look at the first letter of the commands so that the user can use “e” for exit. String.startsWith() may be handy for this. The program should produce a message at the bottom of the screen saying what the last command did, for example if the user used “ascii” the program should say “Switched to ASCII Mode” How do we even begin to do this? First you need to have some understanding on how files work and how numbers are represented. I have provided some reading on the next few pages. → Please read the entire assignment before you start.  I have also provided some sample files in CSILIB. Use this command. Note that there is a dot at the end of this command > cp /home/student/csilib/cse1oof/hexapp/*.dat . OOF Assignment Part B - due: 10:00 am Tues 12th May this is the first and final hand in date p. 6 of
May 06, 2021CSE1OOFLa Trobe University
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here