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

  Enter codes of one to eight characters along

Consider a program to enter codes of one to eight characters along with an associated telephone number and associated notes. A code can represent a person's name, a person's initials, a place, or anything.

  Values of variables of logical section of the pseudocode

What are the values of variables a, b, and c after each line of code of each logical section of the pseudocode. Show why the logical section is running.

  Modularizing code and sorting techniques

Modularizing Code and Sorting Techniques-Imagine you are a part of a team that is tasked with writing a mobile application (app) that will allow users to send pictures to their friends

  Program in visual basic to calculate area of triangle

Write a program in visual basic to calculate area of a triangle.

  Cate a function with the first line functionarrayout

create a function with the first line functionarrayout switcherooarrayin this function should take an array of any

  Write a main function to test valid id

Write a function valid_id that determines if a Students ID is valid. The function takes one argument, a string. Write a main function to test valid_id

  What is java adapter class

What is Java adapter class.

  Write program to compute summation of four grades

when user press, the program computes summation of four grades (Grade1+Grade2+Grade3+Grade4) and print the result in the picture box (picSum).

  Write a program larger that reads two numbers

Write a program larger.s that reads two numbers from stdin, and prints the larger of the two numbers. The numbers can be positive, negative, or zero

  Design application to declare an array

Design an application that declares an array of 10 HousePlants. Prompt the user user for data for each of the HousePlants, then display all the values.

  Implement the curried functions in ocaml

Goal of this project is to get you familiar with programming in OCaml. You will have to write a number of small functions - write a helper function which will add another 3-6 lines.

  Describe what a branch hazard is, and what causes to it

Fully describe at least TWO of the techniques, OTHER than stalling, that can be used (in an attempt) to overcome branch hazards.

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