Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2011Fall

08.16.10 - 12.12.10

Advanced Java

CSYS2413

Thursday
05:30 PM - 08:20 PM

Questions and Answers

Lab02

Objective: To practice using JTables

pastdue

Submit Your Solution

Lab02

Request a Copy of your Solution

Lab02

Requirements

Comments placed in the source code file5 pts
Application placed in an executable JAR file5 pts
Questions can be viewed, edited, added, and deleted through a JTable20 pts
Answers can be viewed, edited, added, and deleted through a JTable20 pts
Questions and Answers are loaded from Data files and can be saved back to those files after changes are made30 pts
The relative popularity of Questions and Answers can be changed in a meaningful way20 pts
Total100 pts

Instructions

For this lab you will need to create a Java Application that allows a user to manage questions and answers. The application should make use of at least two JTables, one for displaying a list of questions which are stored in a questions data file, and another for showing answers which are stored in an answers data file (sample files available below).

The fields stored about a question are:

  • The Question's ID number
  • The Question's text (the question itself)
  • The Question's Asker (the person who asked the question, basically their name)
  • The Number of Times the Question has been viewed

The application should allow the user to view, edit, add, and remove questions from the file as well as providing some way to keep track of the number of times the question has been viewed indicating the questions popularity.

The application should also make the answers to each question available to the user in some way that makes it clear to the user which answers belong to which questions.

The fields stored about an answer are:

  • The Answer's ID
  • The Answer's Question ID (the ID number of the question this answer belongs to)
  • The Answer's text (the answer itself)
  • The person who answered the question (who this answer was provided by)
  • The Answer's popularity

The application should allow the user to view the answers for a specific question and should allow the user to add new answers, remove answers, edit answers, and indicate the popularity of an answer.

Extras