Questions: 11 448

Answers by our Experts: 10 707

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

Q#3)a. Define a class named Movie. Include private fields for the title, year, and name of the director.

Include three public functions with the prototypes

void Movie::setTitle(string);

void Movie::setYear(int);

void Movie::setDirector(string);

Include another function that displays all the information about a Movie.

b. Include a function which accepts 2 objects of type Movie and displays whether or not they were

released in the same year and also whether the Directors are same. String functions may be used.


Q#2). Create a class called Time that has data members to represent hours, minutes and seconds.

Provide the following member functions:-

1. To assign initial values to the Time object.

2. To display a Time object in the form of hh:mm:ss {0 to 24 hours}

3. To add 2 Time objects (the return value should be a Time object)

4. To subtract 2 Time objects (the return value should be a Time object)

5. To compare 2 time objects and to determine if they are equal or if the first is greater or smaller than

the second one.


Q#1). Define a class to represent a complex number called Complex. Provide the following member

functions:-

1. To assign initial values to the Complex object.

2. To display a complex number in a+ib format.

3. To add 2 complex numbers. (the return value should be complex)

4. To subtract 2 complex numbers

Write a main function to test the class.


unconditonally transfer program control within a function


Write a program that reads in a room number, the room’s capacity, and the size of the class enrolled so far, and prints an output line showing the class room number, the capacity, number of students enrolled, number of seats available, and whether the class is closed or not.


Using while or do-while. Make a program that will input Sales, process the Value Added Tax deduction as follows:

 Sales

VAT

Less than equal =10000.00

10%

Above 10000.00

15 %


Display the taxable amount, Your program will be terminated if you input zero in the sales.


The XYZ Manufacturing Company plans to give year-end bonus 

to its employees. Make a flowchart and write a program that 

will compute for the year-end bonus of its employees 

considering the following criteria:

- If employee’s monthly salary is less than or equal to 

P7000, bonus is 50% of the salary.

- For employees with salaries greater than P7000, bonus is 

P7000.

- Print out the names, salaries and the corresponding 

bonuses of the employees.


Create a small Arduino project in tinkerCAD. 

The project must make use of at least the following:

● Any 1 of the following analog sensors: TMP36, Flex sensor, Photoresistor, or Force Sensor.

AND

● Any 2 of the following Digital input devices: Pushbutton, Slide switch, or DIP switch.

AND

● Any 1 of the following Digital output devices: LED, or Piezo Buzzer.

AND

● Any 1 of the following PWM output devices: DC Motor, Hobby gearmotor, RGB LED.

AND

● A 16x2 LCD display


In you program you must make use of the following:

● analogRead(), digitalRead(),analogWrite(), digitalWrite()

● if statements and if else statements, (i.e. testing the value of a sensor)

● at least 1 while loop

● at least 1 for loop 

● an array

● variables

● The LCD display

● arithmetic ( + , - , * , / , % ) and compound operators (+=,-=,*=,/=,%=)

● Comparison and Logical operators



What will the value of the solution variable be after the code segment below has been run.


int solution = 8; 

int number1 = 16, number10 = 3; 

 

solution *= number1 - number10 ;


What will the value of the solution variable be after the code segment below has been run.


int solution = 80; 

int number56 = 16, number15 = 7; 

 

solution -= number56 * number15 ;  



LATEST TUTORIALS
APPROVED BY CLIENTS