Program- file input and file output

Assignment Help C/C++ Programming
Reference no: EM13809326

Lab: File Input and File Output

Write a program that asks the user to answer some questions. First, you should ask the user if they want to load answers from a previously saved file. If they respond yes you should look for the file name of your choosing in the path of your choosing and try to load that. If no file was previously saved or they answered no, the user must answer 8 questions of your choosing. They can be simple (i.e. What is your favorite color?) or they can be difficult (i.e. When the zombie apocalypse comes would you sacrifice your friend for your own survival if need be?).

In your file you should save the questions and the answers on the same line so it will look like this:

What is your favorite color? How old are you?

By doing this we can read in an entire line and simply separate the question based on the location of the question mark, anything before it and including it is the question and anything after it is the answer.

Reference no: EM13809326

Questions Cloud

Evaluate total annual compensation of a salesperson : Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors: A salesperson will earn a fixed salary of $45,000
Biographical information for each woman : Biographical information for each woman
How would broadway book shop go about developing : How would Broadway Book Shop go about developing its information systems and Justify your choice of your selected approach to systems development.
Describe knowledge retention of departing employees : Select and organization of your choice and examine the extent to which it has established any processes or procedures to ensure knowledge retention of departing employees.
Program- file input and file output : Write a program that asks the user to answer some questions. First, you should ask the user if they want to load answers from a previously saved file. What is your favorite color? How old are you
Significant problems for firms pursuing alliance strategies : If adverse selection, moral hazard, and holdup are such significant problems for firms pursuing alliance strategies, why do firms even bother with alliances? Why don't they instead adopt a "go it alone" strategy to replace strategic alliances?
Write a gui-based program that analyzes a round of golf : Write a GUI-based program that analyzes a round of golf. You will retrieve the data for 18 holes from a text file. On each line in the file will be the par for that hole (3, 4, or 5) and your core for that hole should be displayed in a label
Write a critical essay about movie the man who was not there : Write a critical essay about the movie The Man Who Wasn't There and Tay Garnett's 1946 film noir classic The Postman Always Rings Twice.
Explanation of how assumptions of the test were met or not : Explanation of how assumptions of the test were met or not met

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement database having array of pointers

One way to implement this database is to have an array of pointers pointing to Employee objects. You will obviously require a function named Calculate_salary() which will be different for each employee class. Write code in c++

  Find the sixth maclaurin polynomial for sin x

Find the sixth Maclaurin polynomial for sin x and use Chebyshev economization to obtain a lesser-degree polynomial approximation.

  Written a code that parses through a file reading

written a code that parses through a file reading it line by line and splitting it into tokens by white space. But I want a pair of single quotes to be one token, not how many words are in it

  Assignment 1write a program using vectors and iterators

assignment 1write a program using vectors and iterators that allows a user to maintain a personal list of dvd titles.

  Brownian motion is a physical phenomenon

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.

  You are the admissions office at abc medical university

You are the Admissions Office at ABC Medical University. You have a large number of applicants for a very few number of available openings at your school. As a result, you need to set some high admission standards. To be accepted, a student ..

  Take four unsigned char bytes and combine

Take four unsigned char bytes and combine them into a single integer type. You will needed shifts and one of the logical bit operators.

  Generate two files of 100 by 100 mazes

Write a C++ program that opens a file representing an encoded maze and reads it

  20 integers saved in a file called "data.txt"

There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10

  Write a program that creates an arraylist

Write a program that creates an ArrayList and adds a Loan Object, a Date Object, a string, JFrame object, and a circle object to the list, and use a loop to display all the elements in the list by invoking the object's toString() method.

  Create a text adventure game that uses pointers

To get full credit for this program, you will need to use a pointer to a pointer to a string object, and utilize at least one constant pointer. You must use the pointers in if statements to decide if you win or lose the gold, and you must use func..

  Write a driver to thoroughly test your implementation

Write a driver (SortedListArrayDriver) to thoroughly test your implementation. Part of your grade  will depend on evidence of testing. Note that it is not necessary to provide user interaction in your driver class for this program

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd