Write a program that asks the user for a profile name

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

1. Write a recursive function void reverse() that reverses a sentence. For example: Sentence greeting = new Sentence("Hello!"); greeting.reverse(); cout << greeting.get_text()<<endl; prints the string "olleh". Implement a recursive solution by removing the first character, reversing a sentence consisting of the remaining text, and combining the two.

2. Write a base class Worker and derived classes HourlyWorker and SalariedWorker. Every worker has a name and a salary rate. Write a virtual function compute_pay(int hours) that computes the weekly pay for every worker. An hourly worker gets paid the hourly wage for the actual number of hours worked, if hours is at most 40. If the hourly worker worked more than 40 hours, the excess is paid at time and a half. The salaried worker gets paid the hourly wage for 40 hours, no matter what the actual number of hours is.

3. Write a program that asks the user for a profile name and displays the number of characters, words, and lines in that file. Then have the program ask for the name of the next file. When the user enters a file that doesn't exist (such as the empty string), the program should exit.

Reference no: EM13763315

Questions Cloud

Material sold for the material : A company has collected the following data from the purchase and use of heating fuel from its Business Statistics department for inventory management of the previous year:
Calculate net revenue or the revenue from the investment : Calculate net revenue, or the revenue from the investment minus the costs; the present value coefficient for every year; and the present value of the net revenue. Add together column F to get the net present value of the project. Should the firm p..
Write a paper on emergency management and criminal justice : Write a paper on emergency management, homeland security and criminal justice during Hurricane Katrina. Determine what research method designs you will employ to tackle your problem.
A student scored 76 on a general science test : A student scored 76 on a general science test where the mean and standard deviation were 82 and 8, respectively he also scored 53 on a psychology test where the class mean and standard deviation were 58 and 3, respectively. In which class was his rel..
Write a program that asks the user for a profile name : Write a program that asks the user for a profile name and displays the number of characters, words, and lines in that file. Then have the program ask for the name of the next file. When the user enters a file that doesn't exist (such as the empty ..
Evaluation of documentation tools : You have been assigned to analyze the accounting information for a Fortune 500 corporation. From the e-Activity, evaluate which tools you would use to analyze its business processes, indicating your rationale.
Sequential logic structures : Document the steps for the logic structure to capture the payment information. This can be done as either a flowchart or pseudocode. Be sure to include inputs, variable declarations and assignments, and outputs.
Industrial hygiene based questions : Describe how the Environmental Protection Agency started, and discuss its function of the Environmental Protection Agency.
Identify the indirect fixed costs of the charter service : What is the break even unit sales volume company should have projected as part of its business plan before entering this market and should reconsider each time it considers leaving (exiting) this business altogether?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  Compute and display net weekly pay

You need to prepare a C++ program in which you declare variables that holds an hourly wage, a number of hours worked, and a withholding percentage.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Implement a function which finds the largest number

Write a function named largest which will receive the array as input and return the variable LargestNumber.

  Write a program that keeps track of important birthdays

Write a program that keeps track of important birthdays. You can implement it with a one-dimensional array with enumeration type indices, a two-dimensional array, or with parallel arrays.

  Write a program that calculatesand displays the distance

Distance per Tank of GasA car with a 20-gallon gas tank averages 21.5 miles per gallon when driven in townand 26.8 miles per gallon when driven on the highway.

  A palindrome is a number

A palindrome is a number or text phrase that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 34543 and 11611. Write a program that reads in a five-digit integer and determines ..

  Concepts of the object-oriented programming paradigm

Review structured programming concepts -  Describe the main concepts of the object-oriented programming paradigm.

  Task your task is to write a simple program that converts

task your task is to write a simple program that converts between app and ppm values. the screenshots below

  Write a recursive function to draw the pattern

write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern. For example, specifying 4 as the number of lines generates the above pattern.

  The main function should prompt the user

The main function should prompt the user for the 2 numbers, call the function to display the correct label, then calculate and display the sum of the numbers. Call the function to display the correct label, then calculate and display the differenc..

  Summarize the relationship between classes and unions

Write a paper in which you summarize the relationship between structures, classes, and unions in object-oriented programming.

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