This assignment requires a C++ program be written to perform a vote counting and tallying procedure to gauge favorite holiday destinations of individuals. It should present the user with the question and a “ballot” of 5 holiday destinations and an exit/quit option. Once the program is started, it should allow the user to vote multiple times (same as in multiple users using the program to vote). The program should start with a program title and brief instructions on how to vote. It should then ask the user to select an item (vote) from a group of items that are presented. You should use your own choice of holiday destinations. After a vote is cast, incorporate a loop that will allow a new vote to be cast. Keep counters for valid and invalid votes as well as for individual item votes. Print a message informing the user whether that the vote was valid or invalid (No second chance provided to a voter even if the vote is invalid)
Write an expression that will cause the following code to print "less than 20" if the value of userAge is less than 20.
An automated program is required to count the votes received to elect the next union representative for a company. The program must ask how many candidates are registered and the name of each of them, as well as the votes received.
The result of the program will be a matrix that shows the votes received by each candidate, the total of votes received and the percentage that represents that number of votes of the total. In addition, it will present a message with the name of the winning candidate.
Write a program that enable one to key in any 4 numbers and determine their GCD.
Write a program to key in any four numbers and determine the G.C.D.
How tall a ladder should be so that a person of a given height can place several posters on a wall. All posters are pinned to the wall at a mark located at 75% of the posters’ length. Request the user to enter a person’s height (int) in centimeters. Request the user to enter a list of integers such that each integer represents a poster’s length (cm). Assume the user indicates the end of this list by typing a nonpositive integer. Request the user to enter another list of integers such that each integer represents the height, in centimeters, at which the poster with length should be placed on the wall. Assume the user indicates the end of the list by typing a non-positive integer. If the input lists provided are valid then the program should display how tall a ladder needs to be. Otherwise, the message “Invalid posters data” is displayed. the length of a poster cannot exceed the height of the wall. if no ladder is required to place the posters then the program display zero.
Explain the term polymorphism
Distinguish between Compile-time polymorphism and run-time polymorphism
Explain how polymorphism is achieved through C++code
What are friend functions and classes
What is inheritance? Using a C++ code, illustrate how inheritance is implemented?
What is an access specifier? What are the various Access Specifiers in C++?
What do you mean by 'void' return type?
With appropriate examples define and distinguish between the following terms
i) object oriented programming and procedure oriented programming
ii)classes and objects
iii) constructor and destructor
iv)Abstraction and Encapsulation
What is a function in c++? Distinguish between a library function and a user define d function
what are operators in c++?
illustrate at least 4 different types of illustrators in C++
Write a program to determine the G.C.D of four numbers
Write a c++ program to request the student registration number, the student name, the course and the age, and display them all to the user