Questions: 1 835

Answers by our Experts: 1 539

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program in C++ to input a single character and print a message― it is vowel" if it is vowel otherwise print message "It is a "consonant― Use if-else structure and OR (||) operator only.
store procedure or inline procedure? which is the best to access any database in c sharp?
Draw a flowchart that reads the names, sex and score of 2000 students that wrote a mathematics test which was scored out of 40, and outputs the names of the male students that scored above 75% and how many they are.
1) Receive a number and determine whether it is odd or even.
2) Obtain two numbers from the keyboard, and determine and display which (if either) is the larger of the two numbers.
3) Receive 3 numbers and display them in ascending order from smallest to largest
4) Add the numbers from 1 to 100 and display the sum
5) Add the even numbers between 0 and any positive integer number given by the user.
6) Find the average of two numbers given by the user.
7) Find the average, maximum, minimum, and sum of three numbers given by the user.
RecodetheHotelRoomclassofProgrammingProblem4,Section10.3asfollows. Use dynamic memory allocation to reserve space for the guest name. Code a destructor that deallocates the space allocated by the constructor. The destructor should also display a message that it executed. Re- code the main() that you wrote to include use of the constructor, destructor, and new display methods. Compile, execute, and test the resulting program.
Replace the string room number by a character array that stores a 3-character room number. Add the character pointer instance variable guest, which stores the name of the guest occupying the room. Replace the Get_Number() method by the method Display_Number(), which displays the room number, and add the method Display_Guest(), which displays the guest member. Replace the four-argument constructor by a five-argument constructor in which the first argument is the room number, the second argument is the room capacity, the third ar- gument is the room rate (defaulting to 89.00), the fourth argument is the guest
name (defaulting to the NULL pointer), and the fifth argument is the occupancy status (defaulting to zero).
Write a main() that creates a hotel room with room number 123, with a capacity of 4, and a rate of 150.00. Suppose a person checks in. The program should ask the user to enter the number of guests to occupy the room. Change the status of the room to reflect the number of guests that just checked in. Display the information about the room in a nicely formatted way. Now assume that the guests check out. Change the status of the room appropriately and display the information about the room. Next, change the room rate to 175.00. Finally, assume that another person checks in. Ask the user to enter the number of guests to occupy the room. Change the room’s status accordingly and display the new information about the room.
The average of the 20 random numbers is 71

Enter a double value 11.11
Enter a double value 22.22
Enter a double value 33.33
Enter a double value 44.44
Enter a double value 55.55
The total is 166.65
Press any key to continue
Write a program in which you declare a class HotelRoom. The class has the fol- lowing private instance variables: the room number (a string), the room capacity (an integer representing the maximum number of people the room can accom- modate), the occupancy status (an integer, 0 if the room is not occupied, other- wise the number of occupants in the room), and the daily rate (a double). Include a three-argument constructor that sets the room number to its first argument, the room capacity to the second argument, the room rate to the third argument, and that sets the room occupancy status to 0. Compile and test the program. Note: We will continue this exercise in the next section.
Number Analysis Program 


Write a program that reads data from file numbers.txt and process it. The file contains a series of numbers, each written on a separate line. The program should read the contents of the file into an array and then display the lowest, highest, total, and average of the numbers in the array. The program should have the following functions: 


readNumbers. This function reads numbers from file and stores them in the array.

getLowest. This function finds the lowest value in the array and returns that value.

getHighest. This function finds the highest value in the array and returns that value.

getSum. This function calculates and returns the sum of the values in the array.

getAverage. This function calculates and returns the average of the values in the array.
LATEST TUTORIALS
APPROVED BY CLIENTS