This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

A difficult question,who can give me an answer?  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test 004
1. A cost-map contains M*N cells, we have the cost rate for each individual cell.
2. The path is defined as a sequence of cells that connect to each other directly.
3. If two cells are in the same row or column, and there is no cell between them, these two cells are defined as directly connected.
4. The cost of a path is the summary of all the cells� costs involved.
lYou are required to find out a cheapest path from one specified cell to another.
lRequirement:
1. Based on the existing partial system (described below), design and implement your module to solve the problem.
2. Document the API of your module.
3. Draw the relevant UML diagrams for your design.
4. Finish the implementation using language of Java
5. Document your consideration for the performance in your design, because this program may run on devices with limited memory and calculation capabilities.
lThe existing partial system
Map
M: intN: int
getCell(int row, int col): CellgetStartCell(): CellgetTargetCell(): Cell
M: is the row number of the map
N: is the column number of the map
getCell returns the Cell with row and column specified. The start index is 0.
getStartCell and GetTargetCell return the start and end cell of the problem.
Cell
row: intcol: int
getCost(): int

Trace
getTraceLength(): intgetCell(int n): CellgetCost(): int
getTraceLength returns how many cells are involved in this trace.
getCell returns the number n cell in this trace.
getCost returns the total cost of this trace.

[ February 10, 2004: Message edited by: frank yang ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frank-
Two things...
1st thing:
Here at the JavaRanch we're always more than happy to help. Help you to understand what the question is, help you to understand why your solution won't work, help you to fix bugs, that kind of thing. But, we will NOT do your homework for you.
If you'd like to explain what you've tried, explain how you've gone about trying to solve it yourself... we'd be more than happy to help you along, but we won't just give you the answer, get it?
2nd thing:
I'm moving this to the Java In General (Intermeidate) forum, seeing as though this has nothing to do with Certification.
 
I want my playground back. Here, I'll give you this tiny ad for it:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!