Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HI! I'm taking an assembly language introduction class. The program below is in JAVA, but can someone rewrite it in Assembly Language (MIPS) . Thanks

HI! I'm taking an assembly language introduction class. The program below is in JAVA, but can someone rewrite it in Assembly Language (MIPS). Thanks and I will be sure to rate the answer.

This is what I am asked to do in writing my assembly code:

* Purpose: A program to work with arrays, allowing the user to remove or edit values and see the result. * When exiting, the program computes the sum and product of the remaining values.

.

.

.

(If writing the entire program is too long - can someone please help on the first method? Thanks!)

image text in transcribed

image text in transcribed

image text in transcribed

import java.util.Scanner; public class Program!3 private static int] array- new int 10]; / reserves a global array for 10 int values // method: main purpose: to manipulate an array public static void main(Stringl] args) Scanner input-new Scanner(System.in); II get ready to read in values int menuChoice 0; // readies our choice from our menu System.out.print("Please enter 10 integer values: "); I/ ask the user for input, assume correct input for(int i-0; i array.length; i+t) array[i]-input.nextInt0; creates our array with the values given printArrayO;/ this will print out the initial values of the array for the user to see do \// this is our menu, we have the following options to manipulate the array System.out.println"Menu (enter an int as your choice): "); System.out.println("1) Replace an element at a certain position"); System.out.println("2) Remove the max element "); System.out.println("3) Remove the min element"); System.out.println("4) Compute values and exit "); System.out.print("What would you like to do? "); menuChoice input.nextlnt0 if (menuChoice1) import java.util.Scanner; public class Program!3 private static int] array- new int 10]; / reserves a global array for 10 int values // method: main purpose: to manipulate an array public static void main(Stringl] args) Scanner input-new Scanner(System.in); II get ready to read in values int menuChoice 0; // readies our choice from our menu System.out.print("Please enter 10 integer values: "); I/ ask the user for input, assume correct input for(int i-0; i array.length; i+t) array[i]-input.nextInt0; creates our array with the values given printArrayO;/ this will print out the initial values of the array for the user to see do \// this is our menu, we have the following options to manipulate the array System.out.println"Menu (enter an int as your choice): "); System.out.println("1) Replace an element at a certain position"); System.out.println("2) Remove the max element "); System.out.println("3) Remove the min element"); System.out.println("4) Compute values and exit "); System.out.print("What would you like to do? "); menuChoice input.nextlnt0 if (menuChoice1)

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

=+iv. Simple promise No ordinary airline (Virgin Atlantic Airway).

Answered: 1 week ago

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago