Computers and Technology

Purpose: This application provides experience with user input and interaction in the Console, writing files to disk, working with exceptions, and writing programs in C#/.NET. Requirements:
Target Platform: Console
Programming Language: C#
This program is to display the name of the app "Document" followed by a blank line, prompt the user for the name and content for a document, save the document to the current directory, and display a message if it was successful or unsuccessful based on a specification provided. The filename of the document is the name provided by the user with ".txt" appended to it.
When the program runs:
Display "Document" followed by a blank line.
Prompt the user for the name of the document.
Prompt the user for the content that is to be in the document.
Append .txt to the name and use it as the file name.
Save the content to a file in the current directory.
If an exception occurs, output the exception message and exit.
If an exception does not occur, output "[filename] was successfully saved. The document contains [count] characters." and exit. [filename] and [count] are placeholders for the filename of the document and the number of characters it contains.
Note that the requirements say the file is to be saved in the current directory. This means you can use just the file name as the path for the file. If you do that, the file will be saved in the current directory for the application. When I created the project and called it Document, a directory called Document was created that contains Document. sln and another directory called Document. The Document directory inside of the project is the current directory when the application runs and is where you will find the files that are saved.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, darrengresham999
Choose the best explanation for the following statement communication is symbolic
Answers: 3
image
Computers and Technology, 22.06.2019 10:50, christinavelez26
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata. mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata. mat g(s) = a1/(s + a2)
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, brooklyn4932
What engine component is shown in the above figure?
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, shelley3135
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
Do you know the correct answer?
Purpose: This application provides experience with user input and interaction in the Console, writin...

Questions in other subjects:

Konu
Mathematics, 22.10.2020 09:01
Konu
Health, 22.10.2020 09:01
Konu
Mathematics, 22.10.2020 09:01