Docsity

Introduction to Computer Science - Assignment 3 | CS 110, Assignments of Computer Science

Toggle sidebar
bg1
1
LCSEE, WVU
CS 110: INTRODUCTION TO COMPUTER SCIENCE, FALL 2008
PROGRAMMING ASSIGNMENT 3
ANNOUNCED: NOV. 13, 2008
DUE : NOV. 20, 2008, 9:30AM (HARDCOPY OF DOCUMENTATION – IN CLASS)
: DEC. 02, 2008, 11:59PM (PROGRAM CODES AND DOCUMENTATION – SUBMIT COMMAND)
MAXIMUM MARK: 100
Question 1 (Day Number in a Year) 30 marks
Chapter 7, Programming Exercise #13, pp. 462
Note: For this problem, you should use a GUI dialog box, for example using the JOptionPane class to prompt the user for
the inputs, and to display the output to the user.
Question 2 (GUI Examples) 25 marks
(A) Chapter 6, Programming Exercise #3, pp. 374
(B) Chapter 6, Programming Exercise #7, pp. 375
This problem is very similar to the problem we had in Assignment 2: Q2 (Compound Interest) -- Chapter 5, Programming
Exercise #18, pp. 315.
Note: In each case, you should use textfields with JFrames and windows to accept the input, and use buttons and event
handlers to perform the required calculation. (See the Rectangle example in the book, which was also discussed in class).
Question 3 (Arrays in Java) 35 marks
Chapter 9, Programming Exercise #9, pp. 621
Notes:
1. For this problem, you should provide two options for the user:
(1) To read the input data from a file and then send results to a file
(2) To read data from the command line, and display results on the screen
2. These options should be provided as a GUI dialog box, for example using the JOptionPane class.
3. You can ignore the problem solving phase for this question.
Programming Style & Program Organization 10 marks
Further Information
Remember that coding (or implementation) is just one aspect of the problem solving methodology. Projects will be marked
based on how well they follow the software development methodology as described in class. Also, see other examples in
the book. You could copy the problem as described in the book as your Problem Statement. The Problem Solving phase
is mandatory for all the questions. For details on the format for assignment submission, and guidelines for preparing your
projects, please see the documents:
“CS 110: Preparation and Grading of Programming Projects: The Importance of Professionalism”
http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/proj-prep.htm, and
“CS 110: Format of Your Programming Projects”
http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/prformat.htm
These documents are available from the course web site. Also see the Programming Examples in the book.
Submit Command
Please submit all files used in your assignment using the submit command:
http://www.csee.wvu.edu/~adjeroh/classes/cs110/assessment/submit.html
That is, program codes, and the files for the documentation.
Also, you are required to submit a hardcopy of your assignment documentation (problem solving phase, algorithm design,
verification, test plan, and program listing) in class. (See due dates above).

Partial preview of the text

Download Introduction to Computer Science - Assignment 3 | CS 110 and more Assignments Computer Science in PDF only on Docsity!

1

LCSEE, WVU

CS 110: I NTRODUCTION TO COMPUTER SCIENCE, FALL 2008

PROGRAMMING ASSIGNMENT 3

ANNOUNCED: NOV. 13, 2008

DUE : NOV. 20, 2008, 9:30AM (HARDCOPY OF DOCUMENTATION – IN CLASS)

: DEC. 02, 2008, 11:59 PM (PROGRAM CODES AND DOCUMENTATION – SUBMIT COMMAND)

M AXIMUM MARK : 100

Question 1 (Day Number in a Year) 30 marks Chapter 7, Programming Exercise #13, pp. 462

Note: For this problem, you should use a GUI dialog box, for example using the JOptionPane class to prompt the user for the inputs, and to display the output to the user.

Question 2 (GUI Examples) 25 marks (A) Chapter 6, Programming Exercise #3, pp. 374 (B) Chapter 6, Programming Exercise #7, pp. 375 This problem is very similar to the problem we had in Assignment 2: Q2 (Compound Interest) -- Chapter 5, Programming Exercise #18, pp. 315.

Note: In each case, you should use textfields with JFrames and windows to accept the input, and use buttons and event handlers to perform the required calculation. (See the Rectangle example in the book, which was also discussed in class).

Question 3 (Arrays in Java) 35 marks Chapter 9, Programming Exercise #9, pp. 621 Notes:

  1. For this problem, you should provide two options for the user: (1) To read the input data from a file and then send results to a file (2) To read data from the command line, and display results on the screen
  2. These options should be provided as a GUI dialog box, for example using the JOptionPane class.
  3. You can ignore the problem solving phase for this question.

Programming Style & Program Organization 10 marks

Further Information Remember that coding (or implementation) is just one aspect of the problem solving methodology. Projects will be marked based on how well they follow the software development methodology as described in class. Also, see other examples in the book. You could copy the problem as described in the book as your Problem Statement. The Problem Solving phase is mandatory for all the questions. For details on the format for assignment submission, and guidelines for preparing your projects, please see the documents: “CS 110: Preparation and Grading of Programming Projects: The Importance of Professionalism” http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/proj-prep.htm, and

“CS 110: Format of Your Programming Projects” http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/prformat.htm These documents are available from the course web site. Also see the Programming Examples in the book.

Submit Command Please submit all files used in your assignment using the submit command: http://www.csee.wvu.edu/~adjeroh/classes/cs110/assessment/submit.html That is, program codes, and the files for the documentation. Also, you are required to submit a hardcopy of your assignment documentation (problem solving phase, algorithm design, verification, test plan, and program listing) in class. (See due dates above).