Starting from:
$35

$29

Program L9b Solution

Part 1

Get Chapter9b_FillInTheCode.java . Code the answers in java in the provided file.

Part 2

Implement the following methods in the BookStore class and add code in main to test them:

a method searching the library of Books for a given author and returning an ArrayList of such Books.

a method returning an ArrayList of Books whose price is less than a given number a method returning the Book object with the lowest price in the library


STEPS:

    1. Download the zip file: BookstoreExample.zip; unzip it and use the provided classes Book.java, BookStore.java and BookStoreEngine.java as the starting point.
    2. Start by declaring skeletons (i.e. methods that do nothing) of the three methods in the BookStore.java class and make sure that the code compiles.

    3. Implement the first method (use for-each loop) and make sure that it works.

    4. Implement the second method (use for-each loop) and make sure that it works.

    5. Implement the third method (use a regular for loop) and make sure that it works.

    6. See the sample run of the finished program: Lab9bBookStoreSampleRun.txt 

    7. When finished, submit both BookStore and BookStoreEngine classes for grading.

Part 3

Write a Train class with one instance variable: an ArrayList of Passenger objects called travelers.

Use the attached files as the starting point Train.zip


Read the javaDoc comments carefully.


Do not change signatures of the defined methods.


The client and the Passenger classes are fully implemented but you can add to the client if you wish.

You need to implement all the methods that are defined in the Train class.


https://cilearn.csuci.edu/courses/5532/assignments/61976    1/2
12/14/2020    L9b

The sample run is also provided.









































































https://cilearn.csuci.edu/courses/5532/assignments/61976    2/2

More products