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 piece of plastic has a net charge of - Peter pollywog patrol frog - What is the geometric mean of 10 and 12 - Assumptions in qualitative research examples - Phoenix contact's freeware ipassign tool - Nursing multidimensional care2 - How many pounds is $30 - Angus young gibson les paul - 3 estates of france - How to find a recurrence relation from a sequence - Concord security camera manual - Case Study - Operational Planning - All all the below points Need in APA format with at least 300 words excluding 3 references and no plagiarism and need plagiarism report - C11 Week 6 Threaded Discussion - Psychology & Law 2000words essay - Graham condon group fitness timetable - Has any tutor used biography writing services? - Questions(4) 75 words per question - Time varying electric field - On may 10 hudson computing sold - Accounting - PSY/301 Week 2 Presentation...1 Slide and a couple paragraphs - International business charles hill 11th edition pdf - Due Mon-9/28 @ 11PM (EST) 2100 Words APA format with 4 references - Observations of a chemical change - Rachael newsham and dan cohen relationship - A substrate level phosphorylation occurs in the krebs cycle when - Islamic environmental ethics hsc - Sacred time in indigenous religions is - Analysis - Alternate ending for romeo and juliet - Beautiful brains by david dobbs - Sabmiller plc share price - Freak the mighty character descriptions - Chac ai do se ve chords - The saints and the roughnecks - Recrystallization of naphthalene from a mixed solvent lab report - Pacific trails resort case study chapter 6 css - Dis7 - Convert 6 percent to a decimal - Family therapy history theory and practice 6th edition - Respectively equipment cash and accounts payable are - Cultural immersion paper - Which nutrient provides the highest number of calories per gram - Porter's five forces airline industry analysis - Toby's trucking company determined that the distance traveled - The project scope document is valuable for establishing - Which gas would you test for with limewater - HRM 652 EVALUATING RESULTS AND BENEFITS - Xe full electron configuration - Calgary paper company produces paper for photocopiers - Of human interaction joseph luft pdf - Latec finance v knight - Mobile computing and its business implications articles - The survey reading of Kashmir Conflict - High side float valve refrigeration - DISCUSSIONS AND REFLECTION - Cannon bard theory of emotion - 32 amp junction box - General computer controls checklist - Higher rmps past papers - Howard university hospital security breach - Hollier v rambler motors - Worldview and nursing process personal statement - World religion and culture - When was glass windows invented - Discussion 3 - Mlc masterkey business super abn - D23lt deep cycle battery - Arrl yagi antenna design - Which system is not part of the expenditure cycle - Economic and Public Order Crime - Empty chair technique questions - Bhai lalo ji di sakhi in punjabi - Citrix profile management admx - Assignment 3 - Lowes distribution center cheyenne wy - Download the file below - Reasons why government intervene in business - Care essentials by kaiser permanente hawthorne portland or 97214 - In the backyard song - Dive master job description - Royal far west schoolroyal far west school - Havana club anejo blanco lcbo - Assignment 5 - Final Disc 4 - 401 plumeria dr mansfield tx - 3 pages consulting report based on the problems of mentioned company which has been introduced in attached file. - Conduit spacers for duct bank - Grade 11 physics exam questions and answers - Global business review abdc - Discussion - The technical designer focuses on how data should be stored in a decision support system (dss). - Australian masked owl habitat - Hr strategic planning proposals - How early punishments have influences modern correctional philosophy - Federal safeguards for financial reporting abuse - Sa power networks tree pruning - Phở sắc st albans - Use pareto analysis to investigate the data collected on a printed-circuit-board assembly line.