SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 20 Nov 2017 My Price 10.00

The program should then call two functions.

  • The file is called names.txt.
  • It uses a loop to read in each name from the file and store each name in an array called names.
  • The program should then call two functions.
  • The first function:
  • The function is named capitalizeArray
  • It take in a string array
  • It alters the values in the string array to capitalize all of the letters
  • This function must use two for loops (nested for loops) and an if statement. It cannot call any outside functions that we have not discussed in this class.
  • It returns nothing.
  • The second function:
  • The function is named print
  • It takes in an array of strings and an integer for the size of the array
  • It prints out the array using a for loop to the console
  • It returns nothing
  • Once you have filled the array with values, call the capitalizeArray function to capitalize all the names in the array.
  • Next, call the print function to display each of the capitalized names.
  • Copy and paste the starter code below into a new file called capitalize.cpp

 

#include <iostream>

#include <fstream>

using namespace std;

 

void capitalize(string names[], int SIZE);

//converts all of the string in names to be capitalized

 

void print(string names[], int SIZE);

//prints the contents of an array to the console

 

int main() {

   //write program logic here

}

//write functions here

  • Copy and paste the below data into a file called names.txt:

Barbara Stanton

Timoteo Martinez

Grace Gu

Xing Xiao

Dung Kim

Tanya White

Alan Ngo

Abir Fadel

  • Below is the output that your program should give:

BARBARA STANTON

TIMOTEO MARTINEZ

GRACE GU

XING XIAO

DUNG KIM

TANYA WHITE

ALAN NGO

ABIR FADEL

Answers

(5)
Status NEW Posted 20 Nov 2017 07:11 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)