reset password
Author Message
jfraus11
Posts: 1
Posted 14:43 Sep 19, 2018 |

For the last part of the lab do we need to revise the StopWatch class or the ListComparer class?

jhurley
Posts: 207
Posted 14:58 Sep 19, 2018 |

No.  Use the ListComparer class as an example.  Leave the StopWatch class as-is.

dtang9
Posts: 52
Posted 15:04 Sep 19, 2018 |

Do we just turn in 3 files: one main class (with the file reading, sorting, and binary search code), stopwatch (as is), and one jar file?

jhurley
Posts: 207
Posted 15:55 Sep 19, 2018 |
dtang9 wrote:

Do we just turn in 3 files: one main class (with the file reading, sorting, and binary search code), stopwatch (as is), and one jar file?

yes

mflore24
Posts: 9
Posted 20:30 Sep 19, 2018 |

So I’m getting 0ms for my binary searches and 0 for my array sort. Does not seem right to me.

Is that an error in my code or is it really that fast??

Also, are we timing how long it takes for each individual sort and each individual binary search, or are we timing how long it takes overall for all of them?

 

Last edited by mflore24 at 20:48 Sep 19, 2018.
dtang9
Posts: 52
Posted 21:37 Sep 19, 2018 |

I think we time how long it takes for each individual sort and each individual search. In the ListComparer class example, it times a linkedlist and an arraylist separately, but not the overall time.

jhurley
Posts: 207
Posted 10:30 Sep 20, 2018 |
mflore24 wrote:

So I’m getting 0ms for my binary searches and 0 for my array sort. Does not seem right to me.

Is that an error in my code or is it really that fast??

Also, are we timing how long it takes for each individual sort and each individual binary search, or are we timing how long it takes overall for all of them?

 

individual sort and search.  If you get 0 MS, try it with a much larger file.  You can google, say "War and Peace" +.txt to find something