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

A history of the modern world palmer pdf - What are some of the major security threats caused by illegal immigration? - Project in Artificial intelligence - Shear diagram for udl - Nurse practitioner strengths and weaknesses - Clark rubber narre warren - Burj khalifa site plan - Malt extract agar oxoid - Assignment 2 - When the walls came tumbling down by trey ellis - 7.4 homeostasis and cells - Schedule of cost of goods manufactured - 130 size motor dimensions - Icd 10 code for cva thrombosis of basilar artery - Case study zynga face trouble in farmvile - Leadership in Nursing - Comic book articles - Understanding food principles and preparation lab manual answers - The sarbanes oxley act does all of the following except - Order # 9677 - Counseling relationship. - Nasa water rocket simulator - Alpha chi omega founders day - A new soft drink is being market tested - Can you decipher the quotation factor the polynomials answer key - Hkey_current_user software the silicon realms toolworks - What pos system does walmart use - Canon printer problems troubleshooting - Box hill tafe electrical - Epic billing system manual - Classify the following amines as primary secondary or tertiary - 3 reasons why college still matters - South west sydney legal centre - A pair of tickets short story summary - Battle of milvian bridge primary source - Jim dornan amway death - Week 2 Discussion Response to Classmates - Housing nsw rent subsidy form - Soc 120 week 2 assignment waste reduction - New products and innovation - MC Wk2 - Alligator river story values - Nanda nursing diagnosis for necrotizing enterocolitis - Structural formula for ethyl methanoate - Is krill a decomposer - Where does lululemon manufacture their products - Frank auerbach drawing technique - Anthony jeselnik scar on neck - How to calculate average risk premium - 1 zinnea court mill park - E700 sp dcl pipe - Registered manager application form cqc - Enzyme amylase action on starch answers - Take a look at my girlfriend she's the only one - University of wolverhampton vacancies - Midian son of abraham - John lennon solo career songs - Work life balance for idiots dr ludwig rinehart - Power amplifier efficiency calculation - Coventry auto parts mandurah - Create a scenario summary report - Axa accumulator elite - HEIDELBERG [[[[[[[+2761O482071]]]][[]@)) EARLY TERMINATION- PILLS FOR SALE IN HEIDELBERG KRUGERSDORP, MAFIKENG - Questions a social scientist would ask - Sample informative speech about technology - Freemason 2nd degree salute - Nursing implications for senna - Insights Into Criminal Behavior - On going home joan didion - The ugly american book sparknotes - Mental Imagery - Within subject design definition - Theory of chronic sorrow in nursing - Training needs analysis case study - St george card activation - Tcs business 4.0 ppt - Rosetree mortgage opportunity fund case solution - 139 morialta street mansfield - Flight of the conchords robots binary solo meaning - What is electronic clearing account - Arabic alphabet lesson plan - Error 1920 service tenable nessus - Advanced Industrial Hygiene - What is a samadhi - Let the part play you pdf - Brain tumors with restricted diffusion - Essex safeguarding adults board - Alexander pope uses poetry to express his ideas because - Universal purpose of goods - Tesco help centre staff - MS-ACCESS - Discussion - CPSC 355 Project Part 1 - C file - Homework - Cloud Computing - Aws iam policy validator - Week 5 - Case study on consumer behaviour with questions and answers - Philosophy of love syllabus - A7