Find Jobs
Hire Freelancers

Arrays and Arraylists : Frequency tables

$10-30 USD

Ολοκληρώθηκε
Αναρτήθηκε περίπου 8 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
1) use a single dimension array as a frequency counter, exception handling and methods in a Java application that will allow a user to input the miles driven and gallons used for and arbitrary number of trips. Your program will calculate and display the miles per gallon obtained for each trip and print in floating-point results. Test your exception handling by entering a trip while driving a Kia. The method main should Prompt the user for the manufacturer name of the car. They should enter a “1” for Honda, “2” for Toyota,”3” for Ford, “4” for a Chevrolet or a “5” for a Kia for each trip. Declare an array of size 5 as a frequency counter (do this exactly as I have stated because we want to check our exception handling code). Call a method that will prompt the user to enter the miles driven, gallons used, calculate the miles per gallon, display how many miles per gallon this type of car got on this trip. This method then passes back a “1” to add to the frequency counter for each type of car. If the car is a Honda, add a “1” to arrayname[1], if the car is a Toyota, add a “1” to arrayname[2], etc. Use exception handling with a try/catch block to catch an ArrayIndexOutOfBoundsException. Make sure that division by zero will not take place. Check that user input is a non-negative number and allow only positive numbers to be input. If the user has made an error in their input, prompt them again to enter a valid number. Be descriptive so they know what they did wrong when they typed in their number. -i already did most of it although it's not pretty bc its first time programming, however i just need help with the arrays 2) create: use a multidimensional array as a frequency counter to keep track of an arbitrary number of car sales of each car and print the array of total car sales. Here is the 5X3 array that will be used as a frequency counter for car sales. Honda Civic Honda Accord Honda Odyssey Toyota Corolla Toyota Rav4 Toyota Camry Ford Fiesta Ford F-150 Ford Fusion Chevy Malibu Chevy Impala Chevy Cruze Kia Optima Kia Sorrento Kia Soul For example, if I sell a Toyota Rav4, the program should add 1 to the array element at position [1, 1]. Declare a two-dimensional array to fit the table above. Remember to correct the intentional error in the previous assignment so that you do not encounter an exception. Prompt the salesman for the manufacturer name and make of the car. With numbers, but you may use Strings if you’d like. Ex: Enter a “1” for Honda, “2” for Toyota,”3” for Ford, “4” for a Chevrolet or a “5” for a Kia. Next, have them enter a number for the model. Print the values in all of the elements of the array using for loops with a description of the car sales so that I can understand how many cars were sold of each type (without looking at the code). Check that user input is a non-negative number and allow only positive numbers to be input. If the user has made an error in their input, prompt them again to enter a valid number. Be descriptive so they know what they did wrong when they typed in their number.
Ταυτότητα εργασίας: 10382983

Σχετικά με την εργασία

13 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 8 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
String num[][]=new String[a][b]; if (num<0){}else{} just a sample of the [login to view URL] a professional software engineer .i can deliver this in quick [login to view URL] forward to hear from you,thanks
$20 USD σε 2 ημέρες
5,0 (1 αξιολόγηση)
0,6
0,6
13 freelancers δίνουν μια μέση προσφορά $27 USD για αυτή τη δουλειά
Avatar Χρήστη
Hello. Looks like easy assignment
$26 USD σε 1 ημέρα
4,9 (443 αξιολογήσεις)
6,4
6,4
Avatar Χρήστη
Hello, i am expert in java/c/c++ and i can deliver any task in least time and least payments. The code will be well commented and well formatted for better understanding. I believe in long term relations so first check your work then release the payments. Pm me for further details. Thank You!
$30 USD σε 1 ημέρα
5,0 (23 αξιολογήσεις)
4,1
4,1
Avatar Χρήστη
Hello, i'm software engineer and expert java developer. I am very good in data structure and can do this project for you. Please message me in chat and discus details. Regards Usman Shery
$30 USD σε 1 ημέρα
4,6 (13 αξιολογήσεις)
4,1
4,1
Avatar Χρήστη
Hi I have 3+ experience in web development. I did many job like this. I have strong knowledge of Mysql, Oracle, Database Design and I have also strong knowledge in languages like Java, JSP, PHP, Javascript, Bootstrap CSS, Ajgular JS, HTML, CSS, JQuery etc .
$30 USD σε 1 ημέρα
4,7 (6 αξιολογήσεις)
3,7
3,7
Avatar Χρήστη
I have 4 years experience in java and i can start right now
$20 USD σε 1 ημέρα
5,0 (7 αξιολογήσεις)
2,5
2,5
Avatar Χρήστη
My name is Muhammad Shahzeb Ali. I am a Software Engineer. I have: 1. Extensive knowledge of Java, C++, HTML5, CSS, Bootstrap, PHP, SQL(MySql), Javascript, JQuery, Wordpress - I have built one large PHP+MySQL portal for alumni of university ase.classworks.info. - I do not like to do simple HTML coding, I prefer to use existing libraries for that 2. Experience building secure dynamic websites and infrastructure 3. Extreme attention to detail - Before doing any work I sit and described all details, interfaces and methods which are going to be developed. I like to have clear picture before doing the job 4. Ability to thoroughly test and deliver bug-free code - For the last 3 years all my projects were launched in time and after go live I received only small things that should be corrected. I check every logical part of code before sending it to QA. I proud the quality I supply to clients
$25 USD σε 1 ημέρα
5,0 (2 αξιολογήσεις)
1,1
1,1
Avatar Χρήστη
A proposal has not yet been provided
$20 USD σε 1 ημέρα
5,0 (1 αξιολόγηση)
0,6
0,6
Avatar Χρήστη
Hi. i have experience in Java and I really want to do this work for you. It would be a great opportunity. Thank you.
$25 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Moline, United States
5,0
1
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Απρ 4, 2016

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.