Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Study the following class diagram, additional information and answer the questions that follow:
MovieTicket
movieName: string
TicketPrice: double
TicketsSold: int
donation[100]: double
totalCnt: int
MovieTicket();
getName():string
getTicketPrice():double
getnoOfTicketsSold():int
setName(string): void
setTicketPrice(double): void
setnoOfTicketsSold(int): void
computeDonation(int): void
writeFile():void
Additional Information:
MovieTicket is a class written to fulfil the requirements of making 100 donations to charity from the ticket sales. The donation is derived from 10% of the ticket sales. The donations are written to a file.
(a) Write the class specification for MovieTicket.
(b) Write code to implement the following for MovieTicket:
(i) Constructor, Assessors and Mutators
(ii) computeDonation method
(iii) writeFile method
(c) Write a test driver to test ALL the methods written in Part (b). The program uses a loop to repeat 100 times to obtain input (movie name, tickets sold and ticket price) from user and invokes the respective methods to set the values and computes the donation. After the loop, the contents of donation array are written to a file using the writeFile method. Include a screen output in your submission.
Define Passing Structure to a Function? A structure is able to be passed as a function argument identical to any other variable. If we are merely interested in one member of a
Debug the following program to calculate N! #include using namespace std; main() { int N, factorial=1; cout cin >> N;
write a c program chat illustrates the creation of child process using fork system call. One process finds sum of even series and other process finds sum of odd series.
C program to print L diagonal triangle: void main() { int i=0,j=0; int arr[rows][cols]; for (i=0; i
Project Overview A certain financial institution (bank) wishes to promote its new business products/services by conducting road shows in rural areas. Their aim is to encourage peop
How does free know the size of memory to be deleted.? int *i = (int *)malloc(12); followed by free(i); how did free function call know how much of memory to delete? A: It bas
Program is to swap the two values which are enter by user: Program is to swap the two values which are enter by user through the function with values changed using pointers
Create a class Word, representing a word. Two words should be considered equal if they consist of the same sequence of letters and we consider upper case and lower case as equal. F
Explain the class invariant. - It's a condition that ensures correct working of a class and defines all the valid states for an object. - When an object is created class inv
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd