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

Dis 8 - Experiment 7 empirical formula lab report - Distribution Systems: Answer the following two questions. Response for each question should be submitted using the text box and be at least 300 words long. - Python lists are commonly used to store data types. Lists are a collection of information typically called a container. - What is handshaking in microprocessor - Why does btb change color - Were on easy street - Why businesses must have an Internet and IoT marketing strategy - Urban heat island ppt - Central homeopathic research institute noida - Heat of reaction lab conclusion - Certified jenkins engineer exam dumps - Heroes of the storm butcher counter - Project management simulation scenario c - Employee relations strategy ppt - Federal safeguards for financial managers - I am david chapter 1 - Application of Statistics in Health Care - Bec vantage speaking topics - Telco bella vista charge - Dq - Essay 4 - 0.3 sone to db - Cell counting kit 8 protocol - Transported man magic trick - Who is avery brown in the piano lesson - Nurs 6650 midterm exam questions and answers - Home depot customer satisfaction - Judy nunn net worth - Aero - Acadian expulsion family names - Native deodorant australia woolworths - Alcohol, Violence, or Injury Assignment - Kaplan nursing exit exam questions - Queensland plumbing and wastewater code - Watch the movie gung ho a based on 1986 movie “Gung Ho” starring Michael Keaton). nswer questions (number the answers plz) - Australian shepherd stud fee - A plastic sphere floats in water with - Cislin 25 professional insecticide msds - Cipd learning and development level 7 - Columbo candidate for crime cast - Week 2 assignment - Hangman game code in assembly language - Chase bank monterrey blvd baton rouge la - Thread 1 & 2 (180 words each) - Week 5: Discussion: Perspectives that underpin your editorial thinking - Nta certified tutor training - Chapter 22 enlightenment and revolution - Speaker critique essay - Peaceful mountain stomach rescue recall - Assignment 2 analysis on food security - Uniform gradient present worth excel - Discussion: Assessment of LVC from a Training or Return-on-Investment Point of View - Richard simmons stomach formula dvd - What is a courtroom work group - Born haber cycle practice problems - Immigrants in our own land poem - Week 5 - Finish Problems / Need in 2 days - Harvard process analytics simulation answers - Discussion: Wireless Networking - WEEK VII PART 2 - Project management at six flags new jersey - Valve lapping tool canadian tire - Macbeth king duncan's sons - Article reflection ( the link for the article is in the description) - Away from home rate youth allowance - Got lactase the co evolution of genes and culture - MKT-345 D.1 - Reflective journal on classroom management - Social statistics for a diverse society 7th edition pdf - Positive psychology steve baumgardner marie crothers - Bbc ottoman empire documentary rageh omaar - Assignment: Practicum – Assessing Client Families - An agronomist examines the cellulose content - Class in america gregory mantsios analysis - Social work role play scripts - Change proposal nursing capstone - Pil o medical term - Emergis global capital advisors - Communication Plan - Communication in Organizations - Lil wayne quote mirror - 43a langer avenue caringbah south - Bonding in diamond and graphite - The benefits of music education by laura lewis brown - Highfield e learning food safety level 2 answers - Chapter 2 frequency distributions and graphs - Http time com 8515 hungry planet what the world eats - Eaton fuller clutch chart - Hieu 201 lecture quiz 6 - Identifying Variables - NURS521REPLYPROMPT2 - Comparing Existential-Humanistic Therapy to Other Types of Therapy - Why can an induction motor never operate at synchronous speed - Letter to a politician example - The men who made america - 3/3-1 - Candy crush level 3144 hints - Readiness for enhanced spiritual well being care plan