Consider you are working as a developer in a software house “XYZ” and you have to develop a program that will detect the Real time objects by using the Camera. As a developer, you have to decide which programming paradigm would be feasible to design develop this system.
Identify the programming paradigm from the list given below and justify your answer with proper reasons.
Object Oriented Programming Paradigm
Procedural Programming Paradigm
Instructions:
1. You need to provide precise and to the point answer, avoid irrelevant details.
2. Material that is copied from the internet or another student will get zero marks.
3. You cannot participate in the discussion after the due date via email.
4. The GDB will open and close on specified date and time. Please note that NO grace day or extra time will be given for posting comments on GDB.
You are given an array of N non-negative integers: A1, A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1, Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.
Input
The first line of the input contains an integer T denoting the number of test cases.
The first line of each test case contains an integer N denoting the number of elements in the array.
The second line contains N space-separated integers A1, A2, ..., AN denoting the array A.
Output
For each test case, output a single line containing the answer.
Note
A subsequence with only a single integer is also an alternating subsequence.
Constraints
1 ≤ T ≤ 10
1 ≤ N ≤ 105
0 ≤ Ai ≤ 105
An election is contested by 5 candidates. The candidates are numbered 1 to 5 and the voting is done by marking the candidate number on the ballot paper. Write a program to read the ballots and count the votes cast for each candidate. Create custom exception to find invalid age of voter
Design a class to represent a Employee details. Include the following members.
Data Members • Employee Name • Employee ID • Department Name •Basic Salary. Methods • To assign initial values • compute Net salary * print employee details. To Incorporate a constructor to provide initial values and array of objects.
Write a program in C++ that uses a structure to store the following product data in a file (File
Name: product.txt):
Product ID
Product Name
Quantity
Wholesale Cost
Retail Cost
Date Added to Product
The program should have a menu that allows the user to perform the following tasks:
• Add new records to the file.
• Display any record in the file.
The program should calculate and display the following data:
• The total wholesale value of the product
• The total retail value of the product
Input Validation: The program should not accept quantities, or wholesale or retail costs, less
than 0. The program should not accept dates that the programmer determines are unreasonable.
Instructions:
Sample:
Enter a small letter: a
Uppercase = AEnter a small letter: f
Uppercase = FWrite pseudo code for the problem of printing odd numbers less than a given number it should also calculate their sum and count
STRING REVERSE PROGRAM
Create a program that will apply recursive functions.
The program should accept a string say SUBJECT.
The output of the program should be TCEJBUS .
Screen/Layout
Input a string: SUBJECT
After a reverse: TCEJBUS
Try Another[Y/N]: Y
Input a string: face
After reverse: ecaf
Try Another[Y/N]:N
Instructions:
1. In the code editor, you are provided with a main() function that asks the user for 4 integer inputs and passes these to the getBest() function call.
2. Your task is to declare and define this getBest() function which has the following details:
Return type - int
Name - getBest
Parameters - 4 integers
Description - returns the highest integer passed
DO NOT EDIT ANYTHING IN THE MAIN
Input
1. First integer
2. Second integer
3. Third integer
4. Fourth integer
This is the given code:
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d;
cout << "Enter a: ";
cin >> a;
cout << "Enter b: ";
cin >> b;
cout << "Enter c: ";
cin >> c;
cout << "Enter d: ";
cin >> d;
cout << "Highest integer = " << highest;
return 0;
}
Instructions:
1. Your task is to ask the user for a character input.
2. Then, include the cctype built-in library and call the toupper() function. In case you do not know what this function is, this function has the following definition:
Return type - int
Name - toupper
Parameter - one integer which represents the ASCII of a character
Description - returns the ASCII of the uppercase equivalent of the character passed
Extra note - even though it's function definition in the C++ Programming Language Documentation is int toupper(int ch), you can just pass a normal char variable instead and this will just be automatically typecasted/converted to its integer equivalent.
3.Once you get the uppercase equivalent, print this out.
Input
1. Letter to be updated