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 application to use random-number to create sentences

Write an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition.

  Unix or linux versus microsoft windows server

Programmability - address the benefits and disadvantages of using UNIX or Linux versus Microsoft Windows Server within the organization, then propose one of the products.

  What''s the relationship between a domain name and a web host

When I was learning HTML, I had a hard time understanding a lot of the terminology. I think this article does a good job of explaining web hosting, domain names and file names. http://support.hostgator.com/articles/hosting-guide/what-is-the-differ..

  Why are statistical programming languages important

Why are statistical programming languages important to data scientists? What are some advantages and disadvantages the R programming language has over.

  Call the functions in the program

Have the main program call these functions to demonstrate how they work. Also, if you could help to explain to me how both constructors can be replaced with one constructor by using a single constructor with default parameters.

  Javascript function to verify fields if cookie is added

JavaScript function has verified that all the required fields have been filled, cookie is added to user's computer. If same user tries to fill out form second time.

  What is the value displayed on the led

In the Data1: window, right click on num1, then left click on Show Location.  The value of the initialized variables should appear in the Memory window. Cut and paste the Memory window. What is the value displayed on the LEDs after you single step th..

  Write a program that gets names as input from the user

Write a program that gets names as input from the user (Read from the console using cin. You may tell the user to enter a name or q to quit entering names.), allocates a new Person for each of them and stores the pointer to each of them in a vecto..

  What are advantages of using menus in a gui application

What are advantages of using menus in a GUI application? Design a menu structure for a program you would find useful in your work or hobbies. Write and post the code for the menu creation

  Define a command syntax and small-step semantics

Define a command syntax and small-step semantics for if-then (without the else) and extend Agat's type system with a rule for if-then

  Create a subdirectory in your repository

CMPT 214: Programming Principles and Practice Assignment. Create a subdirectory in your repository for a new project called Lab09

  Design a class named customerrecord that holds a customer

design a class named customerrecord that holds a customer number name and address. include methods to set the values

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