Java
Program 0 (Warm up): Gimme a cookie! In the early days of computing, you likely couldn’t afford your own computer. Instead, you had to sit at a terminal – which was literally just a monochrome monitor and keyboard that was connected to a big mainframe machine (hidden somewhere in the building). When you needed a break, you were supposed to log out. Not everyone did and later fell victim to the old “Gimme a cookie” prank. While the person was away, someone else would come along and write a quick program that said “Gimme a cookie: ". When the person returned, they saw this on their terminal. After repeatedly typing in random things (like passwords), they would eventually realize they needed to type the word “cookie” to regain control of their terminal. It’s quite funny, or at least it was 30 years ago. Design (pseudocode) and implement (source code) for this simple program.
Sample run 1:
Gimme a cookie: What?
Gimme a cookie: I don't understand
Gimme a cookie: Who is this?
Gimme a cookie: help?
Gimme a cookie: ls -l
Gimme a cookie: ^C
Gimme a cookie: ^D
Gimme a cookie: ESC
Gimme a cookie: cookie
Don’t leave your terminal open, fool!
7 years ago
10
- Phyllis Only
- $4 price fixed for 300words 7 hours from now. or less
- BUS 620 Managerial Marketing
- Q10-1: Compare fixed, variable, and mixed costs. Q10-2: What do we mean by a Relevant Range? Q10-3: A professional services business has fixed costs of €150,000 and variable costs of €15 per hour. How much does average cost change between 12,000 or 15,
- HCS 451 Week 2 Learning Team Charter
- Essay
- Data analytic is a hot topic these days, not just in business but with employers in all fields. Part of the reason that you are required to take statistics, regardless of your field, is that it aids in critical thinking and assists you in analyzing data.
- math test
- Week 5 Discussion - Econ
- Research Studies Questionnaire