TRINITY CSCI 1311 - Complex Spreadsheet Problems
Pages 7

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Complex Spreadsheet Problems3/18/2009Opening Discussion●Minute Essay comments–How do we get Excel into Greenfoot?●Export to CSV and put it in the directory of the scenario. If you put it someplace else it will be hard to find in Greenfoot.–Math functions in Java.–Using double vs. int.–Greenfoot spreadsheet vs. Excel spreadsheet.Loops: for vs. while●Technically the for-loop and while loop can do the exact same things.–for(A; B; C) {●D–}●Same as:–A–while(B) {●D●C–}Complex Spreadsheet Functions●I have two examples that I want us to play with.–Calculating the value of money spent on a large project in adjusted dollars.–Averages for specific situations. For example you want to know how the company performed in months when certain subunits performed above or below certain levels.●We should step through how to solve each of these first. What would you need to do to solve either on Excel?More Files●We can make our program a little more useful by doing two things. –I'd like to be able to specify the file name I want to read.–I'd like to have the ability to write our table back out to a CSV file.Writing Files●To write to a file we will use a java.io.PrintWriter. Like with the Scanner, we make a new PrintWriter and give it a File object. This time it is the file it should write to.●We can then call print or println on the PrintWriter object.●We should call the close() method when we are done.Minute Essay●Do you have any questions?●What type of problems do you think we should work on next week?●Remember we do interclass problems next


View Full Document

TRINITY CSCI 1311 - Complex Spreadsheet Problems

Course: Csci 1311-
Pages: 7
Documents in this Course
Arrays

Arrays

12 pages

Arrays

Arrays

10 pages

Applets

Applets

5 pages

Arrays

Arrays

8 pages

Methods

Methods

12 pages

Drawing

Drawing

8 pages

Load more
Download Complex Spreadsheet Problems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Complex Spreadsheet Problems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Complex Spreadsheet Problems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?