CMPSC 313.1 Assembly Language Programming
Melusky Fall 2019 Penn State Harrisburg
Problem Set 5
The following problem set will be worth 100 points. The code will be submitted electronically via Canvas using the Problem Set 5 drop box. The assignment is due by the close of the Canvas assignment.
Your code will be graded on both elegance and user-friendliness. Exercise #1 Random Problem (40pts)
Included with this assignment is a file named random.txt. It includes a list of randomly generated numbers. For this assignment you are to open this file and output how many numbers are in this file. You are to collect the minimum, maximum, average (integer) and median values as well. Please write these statistics to a file named output.txt.
Save your solution into a MIPS program named random.asm. Exercise #2 Date Problem (30pts)
Write a MIPS program which instantiates an object from the Date class as follows:
Date d = new Date(10, 31, 2015);
With the date object corresponding to the calendar date October 31, 2015. Include a toString()
method in your program which will print out the date in this format:
10/31/2015
Save your solution in a file named date.asm. Exercise #3 Person Problem (40pts)
Included in the assignment is a file named people.txt. For this assignment you are to read the file and construct a person object for each of the lines in the file. As an example:
Person p = new Person(Henry, Smith);
Include a toString() method in your file which will simply print out the name of the person representing the object.
Save your solution in a file named person.asm.
Submission Requirements: Submit the three files (random.asm, date.asm, person.asm) in a zip file Last Modified: 11/3/2019
with the naming strategy:
First initial + last name + PS + problem set number.zip
As an example, I would submit the code in a zip file named mmeluskyPS5.zip. Submit your zip file via the Problem Set 5 Canvas drop box by the start of the class two weeks from the date it was assigned.
Last Modified: 11/3/2019
Reviews
There are no reviews yet.