Question
Program Specifications Write a program that will read movie titles from files and echos (or prints) them to common input. The program should have a
Program Specifications
Write a program that will read movie titles from files and echos (or prints) them to common input.
The program should have a separate function to perform each of the following tasks.
Prompt the user for data file name and get the filename.
Read one line at a time from the specified file and store all lines in an array and close the file.
After all lines are read into the array, the program should print out all the lines of a file from the array.
Hint:
Make an array large enough to hold the most movies (i.e. 100)
Use the ifstream for the input file type
Use the getline function to read lines into a string variable
Each string in an array is represented by the array name follow by index in a pair of square bracket.
The user should have the option of entering a different file if they choose. Do not end the program making it
work with only one file. (You will need a loop for this. A menu style would be useful for this).
Test it using 2 files with the second file having more lines than the first file. You should make sure that if you
read a long file followed by a short file, the file from the first long file does not merge with the new short file.
txt
2001: A Space Odyssey (1968) 1.HAL 9000
The Computer Wore Tennis Shoes (1969)
Colossus: The Forbin Project (1970)
The Aries Computer (1972)
Demon Seed (1977)
Blade Runner (1982)
2010 (1984) 1.HAL 9000
2.SAL 9000
Electric Dreams (1984)
Hide and Seek (1984, TV movie) The Terminator (1984) 1.Terminator 2.Skynet
D.A.R.Y.L. (1985)
Flight of the Navigator (1986)
Short Circuit (1986)
Not Quite Human (film) (1987)
Not Quite Human II (1989)
Still Not Quite Human (1992)
Star Trek Generations (1994)
Johnny Mnemonic (1995)
Star Trek: First Contact (1996)
Lost in Space (1998)
Star Trek: Insurrection (1998)
Bicentennial Man (1999)
The Matrix (1999)
The Thirteenth Floor (1999)
Virus (1999)
A.I. Artificial Intelligence (2001)
How to Make a Monster (2001)
Star Trek: Nemesis (2002)
The Matrix Reloaded (2003)
The Matrix Revolutions (2003)
I Robot (2004)
Eagle Eye (2008)
Iron Man (2008)
The Social Network (2010)
Iron Man 2 (2010)
Iron Man 3 (2013)
Computer Chess (2013)
Her (2013)
The Machine (2013)
Computers[edit] Desk Set (1957) Billion Dollar Brain (1967) The Andromeda Strain (1971) 1.MEDCOM (medical-data analyzer)
L'ordinateur des pompes funbres AKA The Probability Factor (1974) 1.HP 65
The Machine That Changed the World (TV series) (1992) Triumph of the Nerds: The Rise of Accidental Empires (1996) Nerds 2.0.1: A Brief History of the Internet (1998) The First $20 Million Is Always the Hardest (2002)
Hacking[edit] The Italian Job (1969) Sneakers (1992) Hackers (1995) Pirates of Silicon Valley (1999) Takedown (2000) The Score (2001) Swordfish (2001) The Italian Job (2003) Foolproof (2003) Firewall (2006) Die Hard 4: Live Free or Die Hard (2007) Untraceable (2008) The Social Network (2010) We Are Legion (2012) The Fifth Estate (2013) The Internet's Own Boy: The Story of Aaron Swartz (2014) Open Windows (2014) Algorithm The Hacker Movie (2014) Who Am I No System Is Safe (2014) Blackhat (2015)
Motion Picture[edit] Tron (1982) WarGames (1983) 1.IMSAI 8080
Prime Risk (1985) Ferris Bueller's Day Off (1986) Defense Play (1989) 1.IBM Personal Computer XT
Sneakers (1992) The Net (1995) Hackers (1995) Under Siege 2: Dark Territory (1995) Masterminds (1997) 23 (1998) Entrapment (1999) The Thirteenth Floor (1999) Takedown (2000) Swordfish (2001) What's the Worst That Could Happen? (2001) Code Hunter (2002) Bedwin Hacker (2003) The Italian Job (2003) The Incredibles (2004) Sky Captain and the World of Tomorrow (2004) Firewall (2006) The Net 2.0 (2006) Live Free or Die Hard (2007) WALL-E (2008) WarGames: The Dead Code (2008) Robot & Frank (2012) Disconnect (2013) Algorithm - the hacker movie (2014) Chappie (2015) Ex Machina (2015)
Documentaries[edit] The Internet's Own Boy: The Story of Aaron Swartz (2014) We Are Legion (2012) Hackers Wizards of the Electronic Age (1984) Hackers Outlaws and Angels Codes makers and breakers Hippies from Hell Cyber War Hackers in Wonderland (2000) New York City Hackers (2000) Revolution OS (2001) The Code Linux (2001) The Secret History of Hacking (2001) Freedom Downtime (2001) In the Realm of the Hackers (2002) BBS: The Documentary (2004) The Code-Breakers (2006) Steal This Film (2006) Hackers Are People Too (2008) Hackers Wanted (not officially released, but leaked in 2010) The Virtual Revolution (2010) Code - Breakers, Bletchley Park's Lost Heroes (2011) 1.Colossus computer
DEFCON: The Documentary (2013)[1] The Imitation Game (2014)
Docudrama[edit] The KGB, The Computer and Me (1990)
Virtual reality[edit] Welt am Draht (1973) Welcome to Blood City (1977) Tron (1982) The Lawnmower Man (1992) Disclosure (1994) Strange Days (1995) Kkaku kidtai (Ghost in the Shell) (1995) Virtuosity (1995) VR.5 (1995) Lawnmower Man 2: Beyond Cyberspace (1996) Johnny Mnemonic (1996) Nirvana (1997) The Thirteenth Floor (1999) The Matrix (1999) eXistenZ (1999) Avalon (2001) Storm Watch (aka Code Hunter) (2002) The Matrix Revolutions (2003) The Matrix Reloaded (2003) Code Lyoko (2003) Avatar (2004) Inosensu: Kkaku kidtai (Ghost in the Shell: Innocence) (2004) Cargo (2009) Gamer (2009) Tron: Legacy (2010) Transcendence (2014)
Viruses[edit] Superman III (1983) Office Space (1999) Pulse (2006)
Programming[edit] Disclosure (1994) Code Rush (1998) Pirates of Silicon Valley (1999) How to Make a Monster (2001) The Code Linux (2001) Revolution os (2001) Antitrust (2001) Dopamine (2003) One Point O (2004) Control Alt Delete (2008) Jobs (2013)
Websites[edit] Home Page (1998) Startup.com (2001) FeardotCom (2002) On Line (2002) I-See-You.Com (2006) Steal This Film (2006) Steal This Film II (2006) Google: Behind the Screen (2006) Google: The Thinking Factory (2007) Download: The True Story of the Internet (2008) Untraceable (2008) The Truth According to Wikipedia (2008) The Social Network (2010) Catfish (2010) The Pirate bay Away From Keyboard (2013) The Internship (2013)
Communications[edit] Electric Dreams (1984) You've Got Mail (1998)
Supernatural[edit] Demon Seed (1977) Weird Science (1985) 1.Memotech MTX512 with an FDX add-on The Lawnmower Man (1992) Ghost in the Machine (1993) The Lawnmower Man 2: Beyond Cyberspace (1996) Ghost Machine (2009)
War[edit] Dr. Strangelove (1964) 1.Doomsday device Firefox (1982) WarGames (1983) Stealth (2005)
Space[edit] Apollo 13 (1995) 1.Apollo Guidance Computer RocketMan (1997) From the Earth to the Moon (TV miniseries) (1998) 1.Apollo Guidance Computer
Anime[edit] See also: List of cyberpunk anime worksGhost in the Shell (1995) Serial Experiments Lain (1998) Ghost in the Shell: Stand Alone Complex (2002-2003) Ghost in the Shell 2: Innocence (2004) Ghost in the Shell: S.A.C. 2nd GIG (2004) Ergo Proxy (2006) Ghost in the Shell: Stand Alone Complex: Solid State Society (2006)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started