Design a class named location for locating a maximal value

Assignment Help Programming Languages
Reference no: EM132322733

Module  - Code design and Implementation Assignment

Please consider the 2 code writing tasks and choose 1 to implement.

Code file naming convention for this and all subsequent assignments familynameTask1 if you choose option 1 or familynameTask2 for option 2 in either case the only capital letter is the “T” from task. This task must be implemented within a single file.

Task 1 - The Location class

Design a class named Location for locating a maximal value (Liang 9.13) and its location in a twodimensional array. The class contains public data fields row, column, and maxValue that store the maximal value and its indices in a two-dimensional array with row and column as int types and maxValue as a double type.

Write the following method that returns the location of the largest element in a two-dimensional array:
- public static Location locateLargest(double[][] a)

The return value is an instance of Location. Write a test program that prompts the user to enter a two-dimensional array and displays the location of the largest element in the array. Here is a sample run (note input style difference from last module task 2):

1147_Example.jpg

Task 2 - Sort ArrayList

Write a program with the following method that sorts an ArrayList of numbers:

- public static void sort(ArrayList<Integer> list)

Write a test method within the program that prompts the user to enter 5 numbers, stores them in an array list, displays them in increasing order, followed by their total (sum) value. Here is a sample run:

Enter 5 integers: -1 3 2 5 4

Sorted -1 2 3 4 5 Sum 13...

Reference no: EM132322733

Questions Cloud

Why is the study of databases important : Why is the study of databases important? How are databases relevant in today's software development environment?
Discuss at least three different cpu scheduling algorithms : Discuss at least three different CPU scheduling algorithms with an example pointing out the scenarios when each of those algorithms will be appropriate to use.
Requirements for the cache and main memory : What are the requirements for the cache and main memory to meet these needs?
Compute the factorial of a number : Compose a simple program that uses recursion to compute the factorial of a number - make sure to throw an exception if the user enters a negative integer
Design a class named location for locating a maximal value : CSC 275 Computer Programming Concepts II- University of Illinois Springfield-US-Write a test program that prompts the user to enter a two-dimensional array.
What are some difference and similarities of java : In your opinion which would you prefer to use? If some code snippets could be provided as examples that would be helpful.
Advantages and disadvantages of java : What are some of the advantages and disadvantages of Java?
Brief description of the program : Input List and Output List, and full pseudocode. Place the pseudocode for each module above the module's Python code.
Establish an appropriate set of guidelines for hacker code : How can you establish an appropriate set of guidelines for hacker code of ethics without becoming a moral relativist?

Reviews

len2322733

6/15/2019 12:27:41 AM

Please choose either task 1 or task 2, not both. References should be Harvard style citation. The filename should be baluchTask1 or baluchTask2. it must be a tar file script! Must Include The Following Statement as Comments At The Top of Each Code File: I declare that all material in this assessment task is my own work except where there is clear acknowledgment or reference to the work of others. I further declare that I have complied with, and agree to abide by, the UIS Academic Integrity Policy at the University website.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd