Create a text file with the users name and store everything

Assignment Help Computer Engineering
Reference no: EM132207496

Write a program which:

1. Asks the user to enter his/her name AND validates it

2. Once the name is validated, then the program prompts the user to enter anything (s)he wants until user types -1.

3. The program must create a text file with the user's name AND store EVERYTHING the user types in it.

4. The program must then read the contents of the file and count the number of even digits and the number of odd digits

5. The program should display the number of even digits if there are any; otherwise it should indicate that there are no even digits.

6. The program should display the number of odd digits if there are any; otherwise it should indicate that there are no odd digits.

7. The program MUST have the following functions:

void validateUserName(which parameters? pass by reference or by value?);//validate user name

void validateUserInput(which parameters? pass by reference or by value?);//validate user input

void checkEvenDigit(which parameters? pass by reference or by value?);//check for the presence of even digits

void checkOddDigit(which parameters? pass by reference or by value?);//check for the presence of odd digits

void createFile(which parameters? pass by reference or by value?);//create userFile

void writeDataToFile(which parameters? pass by reference or by value?);//write to the file

void readDataFromFile(which parameters? pass by reference or by value?);//read from the file

void displayResults(which parameters? pass by reference or by value?);//display results

8. The main() function should consist mostly of local variable declarations and a series of function calls. One of the objectives of the quiz is to get you to "modularize" your programs using functions-hence main() must necessarily be very short!

GENERAL RESTRICTIONS FOR ALL ASSIGNMENTS

No global variables

No infinite loops, examples include:

for(;;;)

while(1)

while(true)

do{//code}while(1);

No break statements to exit loops

Reference no: EM132207496

Questions Cloud

Calculate the natural rate of unemployment : Calculate the natural rate of unemployment for this example. Now assume that pet = ?pt-1 and suppose ? is initially equal to 0. Suppose that the rate.
Golden girl of metropolitan government : Krista Acklen was the “golden girl” of a metropolitan government in a large midwestern city.
Calculate the average of the first ten terms sequence : Write a piece of code that calculates the average of the first 10 terms sequence using a for loop, and then prints the resulting average.
What is the purpose of establishing pay ranges : What is the purpose of establishing pay ranges? Be sure to write response in third person narrative.
Create a text file with the users name and store everything : The program must create a text file with the user's name AND store EVERYTHING the user types in it.
What is the cost to consumers of steel : If the labor input is 2 person hours per finished ton of steel, what is the cost to consumers of steel per domestic steel industry job saved by the tariffs?
Incorporated into the final divorce degree : When Roger and Susan divorced, they entered into a property settlement agreement that was incorporated into the final divorce degree.
Elements of keurig external and internal environments : How does Keurig’s strategy stand up against competitive rivalry in the industry? Review the important elements of Keurig’s external and internal environments.
How did each painting reflect or inspire social change : How did each painting reflect or inspire social change or revolution? What was the social or revolutionary context of the painting?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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