I need some Android OOP advice

  • Replies:0
tjdroid
  • Forum posts: 1

Dec 29, 2012, 10:28:28 PM via Website

I'm developing an app for my college capstone project. It's an app for building contractors that has three basic functions. It allows them to create a project (project object), create a visit for the project where they can enter notes about the visit (visit object) and take pictures during the visit (picture object). At the conclusion of the visit they can then send an email with the notes and pictures to their boss, client, etc. My design consisted of those three objects: Project, Visit, and Picture.

I originally designed this last March and then another class, Java 6 which required I pass the Java certification test, kicked in. I finally passed the certification and am working on completing the project. Right now I have the following objects:
DbAdapter - parent class for handling the tables
ProjectDbAdapter - child class for handling the Project table
ProjectListActivity - class for displaying the Projects and providing editing and selection of a project
ProjectEditActivity - class for editing the Project fields
ProjectShowActivity - class the displays a project's information and allows options for editing the project and creating a visit

I'm having a problem in that if I click on a project in the ProjectListActivity screen, to open the project in the ProjectShowActivity screen I don't have the information, rowId value, to pass to the ProjectShowActivity to query the database to display the project record.

Based on my design, I should have a Project object that I can pass but I haven't implemented that yet and I don't know if I need to.

So, I'm looking for opinions and advice. Do I need to have a Project object or should the ProjectListActivity serve the same purpose and by the same token, do I need a Picture and Visit object or will the corresponding activities serve the same purpose.

Thanks

Reply