Difference between revisions of "Program a day"
(→Week 7) |
|||
Line 23: | Line 23: | ||
===[[Adding Two Matrices]]=== | ===[[Adding Two Matrices]]=== | ||
− | = | + | {{1010PrAD|Problem= |
+ | |||
+ | |||
+ | You're joining a tradition! Most computer scientists begin their programming career by writing a short program that outputs the message "Hello World". Of course, you could customize your message. | ||
+ | |||
+ | TO DO: | ||
+ | 1. Write a message that outputs a greeting in System.out. | ||
+ | 2. Test your code. | ||
+ | 3. Now revise your code so the message is also output in a dialog box (use JOptionPane) | ||
+ | 4. Test your code. | ||
+ | 5. Now add a String variable. | ||
+ | 6. Use JOptionPane to get the user to input a name. | ||
+ | 7. Revise your output to read "Hello [name]" where name is the value stored in the String variable. | ||
+ | |||
+ | |||
+ | |SideSection= | ||
+ | [[Image:OperatingSystemExample.jpg|float|267px]] | ||
+ | <BR> | ||
+ | Taken from http://www.flickr.com/photos/daniello/565304023/ | ||
+ | |||
+ | }} | ||
+ | __NOTOC__ | ||
+ | __NOEDITSECTION__ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <br/> | ||
+ | <table width = 100%, style="font-size:130%"> | ||
+ | <tr> | ||
+ | <td align = left>'''Chapter 1: '''[[Application Software]]</td> | ||
+ | <td align = left>[[COMP1260 | Table of Contents]] </td> | ||
+ | <td align = right>'''Chapter 3: '''[[Hardware]]</td> | ||
+ | </tr> | ||
+ | </table> | ||
=[[Program A Day: Static Methods|Week 8: Static Methods]]= | =[[Program A Day: Static Methods|Week 8: Static Methods]]= |
Revision as of 12:28, 30 March 2010
Chapter #Practice your programming and problem-solving skills. Write a program for each (week) day you are in COMP 1010. | ||
---|---|---|
Write a Program a Day | Case Studies |
Table of Contents |
---|
Week 1: Getting Started
Hello World
Mad Lib
Week 2: Primitive Data Types
Grading Problem
Week 3: If/Nested If Statements and Named Constants
Week 4
Week 5
Week 6: Problem Solving with Nested Loops
Rainfall Averager
Adding Two Matrices
Back to the Program-A-Day homepage
ProblemYou're joining a tradition! Most computer scientists begin their programming career by writing a short program that outputs the message "Hello World". Of course, you could customize your message. TO DO: 1. Write a message that outputs a greeting in System.out. 2. Test your code. 3. Now revise your code so the message is also output in a dialog box (use JOptionPane) 4. Test your code. 5. Now add a String variable. 6. Use JOptionPane to get the user to input a name. 7. Revise your output to read "Hello [name]" where name is the value stored in the String variable. |
SideSectionTitle | |
---|---|---|
SolutionSolution goes here. | ||
CodeSolutionCode goes here. Please DO NOT put your code in <pre> tags! |
Chapter 1: Application Software | Table of Contents | Chapter 3: Hardware |