CIS 103.PNG - Introduction By now you should have completed...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction By now you should have completed all ofthe regular chapters in the textbook. We have also completed a simple Fortune Cookie application: however, the fortunes are "hard—coded" into the application and can't be changed after the program has been compiled (without editing the source and re—compiling). In this next lab. we'll type all the fortunes, one per line. into a new plain text file named FortuneFiledata (but they can be different fortunes, if you like}. Assignment Read my supplement in the Resources on File Handling and then modify the FortuneCookie program (attached here), saving the new version as FortuneFile.java to read all the fortunes from the FortuneFiledata file when the program first starts. Pay particular attention to the end of my resource as that tells you everything you need to know to accomplish this. Hints: You'll need to change the name of the file and the class. You'll need to import some newJaua classes from a newJava package and modify some method headers. The work of reading the file, since it only needs to be done once at the beginning of the program, should be in the initialization section. or more specifically, the loadFortunes method that it calls. ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern