开发者

Advice on managing a list of information

开发者 https://www.devze.com 2023-02-11 02:01 出处:网络
I have been studying Java for a little bit now, and I\'m ready to try building something.I think I have the basic understanding of how to build simple parts, but I have a hard time planning out my pro

I have been studying Java for a little bit now, and I'm ready to try building something. I think I have the basic understanding of how to build simple parts, but I have a hard time planning out my project. I was hoping you guys could tell me what I would need to make it work.

I am creating an app for work. I work in the ATM business, and we provide tech support for all ATM models. So we have a master list of atm error codes, what models they apply to, their descriptions, and solutions.

From the App I would like to make it searchable by ATM manufacturer->Model->List of error codes to choose from. AND searchable by error code.

What I'm not sure about is how to save such a big list of codes. I've got them 开发者_JAVA技巧formatted like this: ("Hyosung", "1000", "20001", "Unable to Detect Cassette", "Remove and replace cassette - Check the micro-switch located on the inside left wall")

(MANUFACTURER, MODEL, CODE, DESCRIPTION, SOLUTION)

So depending on how the user chooses to search, it could pull all error

There are, maybe, 1000 error codes. Would it be best to save this to a text file that the app can access? How would you guys manage the error codes?


Store it in a SQLite database. It might be a slight overkill in this case, but it's flexible enough (and you really should learn about databases anyway).


Your error codes seem to be in CSV format. So:

  1. On first use of application parse CSV file line by line using one of CSV parsing libs: http://opencsv.sourceforge.net/

  2. Save every line of data as a row in database: http://developer.android.com/guide/topics/data/data-storage.html#db

  3. Create a simple GUI where you enter error code and it returns all data for this error code.

0

精彩评论

暂无评论...
验证码 换一张
取 消