Design an algorithm that will prompt for filename

Assignment Help Computer Engineering
Reference no: EM132208421

Write the program in c++ only

A file of student records contains name, gender (M or F), age (in years), and marital status(S or M) for each student. Design an algorithm that will prompt for filename, make sure the input file exists. then read the file and generate a report.

The first part of the output report are the Eligible Bachelors.

If any single men are over 30 years of age, print their names and ages. Also, while you are reading the file, calculate the numbers of married men, single men, married women, and single women (this will require multiple counters...). Print the totals in the Student Summary section.

Make nice headings and format for your output file (see example below). No other output is generated in the runtime console window. (Although while you are testing, you may want to send output there to make sure you are reading the file correctly).

Format of output file

Eligible Bachelors

Name Age

Slkdfj slkd 31

Slkd fslkdf 35

Student Summary Report

Married men: xx

Married women: xx

Single men: xx

Single women: xx

Total students xx

Create the file students.txt listed below for testing. Print the output file as your runtime output. I will test your program on another file that I create.

So you might want to create another file to try out! Remember to use Notepad, and remember to hit "Enter" at the end of the last line, otherwise you may not read out the last line correctly.

Example of input file format: (Notice that the # character is used to indicate the end of the name, you will have to use getline with ‘#' as the delimiter character.)

Name#gender age maritalstatus

Jenny Smith#F 25 M

John Brown#M 32 S

Tom Jones#M 22 S

Ann Jones#F 35 M

Sue Davis#F 20 S

Bugs Bunny#M 45 S

Captain Kirk#M 50 S

Lucy Ricardo#F 39 M

Reference no: EM132208421

Questions Cloud

Identify the cultural movements of the contemporary age : You will write a paper on the theme of how cultural movements in the contemporary age have impacted the development of Western culture.
Dynamically allocate student objects and store the objects : Dynamically allocate student objects and store the objects in the array humanList (an array of human pointers).
Program to show inflation rates for two successive years : Write a program in C++ that outputs inflation rates for two successive years and whether the inflation s increasing or decreasing.
How many hours should you quote for the first five units : You are bidding a project for the JSF and your team has estimated that at unit 50 you should be able to make a particular part for 55 hours.
Design an algorithm that will prompt for filename : A file of student records contains name, gender (M or F), age (in years), and marital status(S or M) for each student.
Would share a heavier tax burden : Suppose the government imposes a per-unit tax on the cigarette sellers. Who, buyers or sellers, would share a heavier tax burden? Explain your answers without.
What is the cost inflicted on the neighbour : People live right beside the OSP factories constantly complain about the horrible noise generated in the process of training parrots to sing La Traviata.
Write a program in c that builds a contiguous list of 1 : Write a program in C that: a. Builds a contiguous list of 100 cells. b. Populates the cells with random numbers between 0 and 1000.
Why do governments usually apply a sales tax to the goods : Why do governments usually apply a sales tax to the goods that are characterized by an inelastic demand rather than elastic demand?

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