Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

P8

07/08/2020 Client: mark2106 Deadline: 10 Days

 


Consider the following problems, design and submit the algorithm, along with the source code, and snapshots of the running programs.


Problem 1:


Write a program that initializes an array with ten random integers and then prints out the following:



  • Every element at an even index;

  • Every even element

  • All elements in reverse order;

  • Only the first and last elements;

  • The minimum and maximum element

  • The sum of all elements

  • The alternating sum of all elements, where the alternating sum contains all elements at even index added, and the elements at odd index subtracted.


Problem 2:


Write a program that reads a sequence of input values and displays a bar chart of the values in data, using asterisks, like this:


*********************

*************************

*********

**************************


You may assume that all values are positive. First figure out the maximum value in data. That value's bar should be drawn with 40 asterisks. Shorter bars should use proportionally fewer asterisks. Improve your program by adding caption to your bar. Prompt the user for the captions and data values. The output should look like this:


Egypt *********************


France *************************


Norway *********


Germany **************************


Problem 3:


Design and implement an application that reads a sequence of up to 25 pairs of names and postal (ZIP) codes for individuals. Store the data in an object designed to store a first name (string), last name (string), and postal code (integer). Assume each line of input will contain two strings followed by an integer value, each separated by a tab character. Then, after the input has been read in, print the list in an appropriate format to the screen.


Problem 4:


A theater seating chart is implemented as a two-dimensional array of ticket prices like presented below. Write a program that prompts the users to pick either a seat or a price. Mark sold seats by changing the price to zero. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price. Verify that the price is among those offered by the theater.


10 10 10 10 10 10 10 10 10 10

10 10 10 10 10 10 10 10 10 10

10 10 10 10 10 10 10 10 10 10

10 10 20 20 20 20 20 20 10 10

10 10 20 20 20 20 20 20 10 10

10 10 20 20 20 20 20 20 10 10

20 20 30 30 40 40 30 30 20 20

20 30 30 40 50 50 40 30 30 20

30 40 50 50 50 50 50 50 40 30


Problem 5: 2D Array Operations 


Write a program that creates a two-dimensional array initialized with test data. Use any primitive data type that you wish. The program should have the following methods:



  • getTotal. This method should accept a two-dimensional array as its argument and return the total of all the values in the array.

  • getAverage. This method should accept a two-dimensional array as its argument and return the average of all the values in the array.

  • getRowTotal. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return the total of the values in the specified row.

  • getColumnTotal. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a column in the array. The method should return the total of the values in the specified column.

  • getHighestInRow. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return the highest value in the specified row of the array.

  • getLowestInRow. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return the lowest value in the specified row of the array.


Demonstrate each of the methods in this program.


Submission


You are required to submit the following files for this assignment by clicking the Submit Assignment button above.



  • You should create one Java file for each problem and save them all in one folder. Compress the folder as a .zip file and submit it here. Please name your .zip file as P8-Last Name-First Nam.zip. For example, P8-Smith-John.zip

  • A Word document containing the algorithms and the screenshots of the running programs for all of the five problems. Please name your Word document as P8-Last Name-First Name.docx or .doc. For example, P8-Smith-John.docx.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Academic Master
Writer Writer Name Offer Chat
Academic Master

ONLINE

Academic Master

I have super grip on essays, case studies, reports and discussion posts. I am working on this forum from last 6 years with full amount of satisfaction of my clients.

$185 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Jackson automotive case study solution - Harley davidson demographic customer - Sociology: Family Discussion - Use link to answer questions /ALL questions - 500 word essay MLA format - Week 1 Discussion - Management assignment - Tutorial 8 sam project 1a - Are government securities assets or liabilities - Narrative orientation complication resolution - Am i being abused by my boyfriend quiz - Present progressive irregular forms - ATI maternal 2019 - Elc edinburgh 62 george street - What is a profile paper - [email protected] - The retailer considers visa and mastercard sales as - Gcse biology revision notes pdf 9 1 - Some lessons from the assembly line - Leicestershire midweek floodlit youth league - Are too many people going to college charles murray - How to get the cumulative relative frequency - Science - Single phase half wave uncontrolled rectifier - Crypto Week 2 discussion - What outcomes do horizontal merger and acquisition strategies intend - Direct medicine courier pharmacy - Consider the following uneven cash flow stream - A cantilever beam is loaded as shown - Michelle fleshner worked for pepose vision institute - APA 7TH EDITION (3) - Forces in 1 dimension - Writing a Critical Review, Creating an Essay Outline, critical analysis and academic writing skills - Sutherland to cronulla fun run - Bric bovill risk insurance consultants - Oral Communication Homework - According to j rachels what is the core of ethics - Boeing 767 first flight - Can. some one write me an essay on How does our cultural worldview influence and inform our perceptions of people from other cultures? Provide concrete examples as well. - Www apple com legal warranty - Pre-calc 20-question test - Did ray kroc steal mcdonald's - Graduate certificate in international relations - Back to reality eminem - Acls oropharyngeal airway size - Currency Speculation - Antacid experiment results - An inconvenient truth study guide - Showdown in a paris theater answer key - Arrival and departure routines in childcare - Leadership Style - Fact finding techniques pdf - I need a discussion - When were fiber optic cables invented - Roland barthes from work to text analysis - Assignment 4) Changing the Immutable: Donella Meadows' "Biodiversity: The key to Saving Life on Earth" - Federal enterprise architecture framework ppt - Beer pong bounce rules - 1534 jacques cartier 1984 canadian dollar value - Bamboo consulting is a consulting firm owned - What is the renaissance motet - How to integrate hyperbolic functions - Final project - 4330 n civic center plaza suite 100 scottsdale az 85251 - The american renaissance mid unit test part 2 - International business - Four page work - Silver nitrate flame test color - Jms stylet oil label nz - Phet salt and sugar - Describe the organizational culture of ez pleeze - Survey Jazz - Cisi investment advice diploma - Derivative of arctan x - Bsbcmm401a make a presentation assessment answers - Car rental management system in java - Australian steel section properties - Pathos examples in ads - What physical feature most distinguishes biotite mica from muscovite mica - Glasgow angling centre catalogue - Kristen's cookie company gantt chart - There are two factories located at p and q - Baroque Art - Epoch global equity shareholder yield - Examples of explicit and implicit costs - Midyis test example questions - Federal Reserve and the Great Recession Analysis - Advanced Pathophysiology - Electronic devices floyd 9th edition ppt - Liver cake for dogs - Diploma in security and risk management - Helio courier h 800 specs - I once met a girl named maria - Qnt 561 week 6 signature assignment consumer food - Nrc ballymena farm lodge - Memento psychology - CIS 505 WEEK 9 ASSIGNMENT - Who is lucinda's employer answers - Student development theory case studies - Salvation army workday login