Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 3 Directions Create an algorithm to calculate a paycheck. The inputs will be a number of hours worked, a pay rate per hour, and
Assignment Directions
Create an algorithm to calculate a paycheck. The inputs will be a number of hours worked, a pay rate per hour, and a bonus.
The program will read in two or three integers, the first will be the number of hours worked, the second will be the pay rate. If there is a third number it will be a bonus added onto the pay after the multiplication.
Implement the program in a high level language Java.
Implement the program in MIPSzy Assembly language. Use the high level code as comments to the right of the Assembly code as the textbook does.
If you write that MIPSzy program in a text editor, you can then paste it into the simulator box in of Chapter in the ZYBook. You can run the simulation there to test the code.
The input values should be entered in the input box before hitting run. Do not worry if the line wraps to the next line.
Input works by placing the value to be read in from the input box in memory location and a in memory location If there is no more input a will be placed in memory location as a space delimited list. See the sample below.
Results should be written to memory location which will cause them to be written to the output window.
Include a comment at the top of the program with your name and Panther id
Export the file by clicking the More Options button and then Export on the right side. That will paste your program into a small box on the right. Copy and paste that into a text document. Call that document FirstnameLastnameAtxt
Submit FirstnameLastnameAtxt
Here is a sample of the input and output:
Input:
Output:
A sample program to show how to manage input and output is as follows. Type a single digit integer number in the Input box and run the program.
addi $t $zero, # Output loc
BegLoop:
addi $t $zero, # Input ready?
lw $t$t
beq $t $zero, NoInput
addi $t $zero, # Input loc
lw $t$t
addi $t $zero,
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
j BegLoop
NoInput:
Rubric
Assignment Rubric
Assignment Rubric
Criteria Ratings Pts
This criterion is linked to a Learning OutcomeSubmission as expected.
A txt file was submitted FirstnameLastnameAtxt
pts
Excellent
Submission met all requirements.
pts
Good
Submission had a minor error like the filename was not as requested.
pts
Needs Work
Submission had major errors
pts
Not submitted
Not submitted or totally wrong submission.
pts
This criterion is linked to a Learning OutcomeHigh level language algorithm included in comments
pts
Excellent
Submission met all requirements.
pts
Good
Submission included with minor errors.
pts
Needs work
Submission included with major errors.
pts
Not submitted
Not submitted or not included.
pts
This criterion is linked to a Learning OutcomeMIPSzy program submitted as requested The code submitted for the MIPSzy language is submitted as an export as specified.
pts
Excellent
Submission met all requirements and was submitted as an export pasted into a text document without modifications.
pts
Good
Submission had a minor error. like it was submitted as a text document rather than an export from the ZYBook..
pts
Needs work
Submission included with major errors.
pts
No Marks
Not submitted or not included.
pts
This criterion is linked to a Learning OutcomeMIPSzy program submitted as requested.
The code submitted for the MIPSzy language works properly with the expected output.
pts
Excellent
Submission met all requirements and output was correct.
pts
Good
Submission had a minor error something like putting the result in the wrong memory location.
pts
Needs work
Submission included with major errors like the wrong results.
pts
No Marks
Not submitted or not included.
pts
Total Points:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started