Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA please! 1) Parallel Arrays (page 152 Chapter 7) --------------------------------------- a) In the main method create the following 3 (three) single dimension arrays: int carsWeight[]

JAVA please!

1) Parallel Arrays (page 152 Chapter 7) --------------------------------------- a) In the main method create the following 3 (three) single dimension arrays: int carsWeight[] = { 50102, 23908, 12098 }; //carsWeight String owner[] = { "Michael Hall", "Maria Lopez", "Mo Freeman" }; //owers name double totalMiles[] = { 104.45, 232.78, 153.07 }; //total miles b) From the main method call a new method named parallel, passing the 3 arrays created in question 1a above. c) In the new parallel method accept and display the data received using Parallel Arrays as explained in class. 2) Enhanced For Loops (Page 154 Chapter 7) ------------------------------------------ a) In the main method create an array of Object data type named objectArray. b) From the main method call a method named theEnhanceForLoop passing the objectArray. c) In the theEnhanceForLoop search and display all data in the objectArray using an enhanced for loops. 3) String Tokenizers (Page 156 Chapter 7) ----------------------------------------- a) From the main method call a method named: tokens. In the tokens method, do the following: b) Display the following string delimited by [$%*&] String str1 = "Jill$Billy%Becky*Tara&Mary"; c) Display the following string delimited by [:.] String str2 = "http://gaddisbooks.com"; d) Display the following string delimited by ' ' (this means one space) String str3 = "blue one red three yellow"; 4) ArrayLists (Page 167 Chapter 8) ---------------------------------- a) From the main method call a method named: theArrayList, that will: b) Create an ArrayList of Object data type named theList. c) Add the following data: 123, "Java", 3.75, "Fall C", 2099 into the theList data structure. d) Display all data in the theList data structure. e) Delete second and fifth records from the theList data structure. f) Display all data left in the theList data structure. 5) ArrayList of Object Data Type (Page 188 Chapter 8) ----------------------------------------------------- a) From the main method call a new method named theObjects passing the following data: 1, "one", 1.4, 0.25, "COP3804", "Java Language", 100 b) In the method theObjects accept the data and load it into an arraylist of Object data type named theObjectList. c) Using printf display/print the data inside the theObjectList.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions