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

Your task is to perform some functions on integer arrays. Specifically you will write a C program

that does the following:

1. Declare an array of size 20.

2. Initialize the array with random values (use loop, and rand() function).

3. Print all the elements in the array.

4. Print all the elements in the array in the reverse order.

5. Print the array such that every Nth element gets printed. N is user input.


A university that you attend requires an application that will print out a Course Report. You are required to create an application with this course data:

       COURSE CODE

DISD DIWD DIDM

COURSE NAME

Diploma in Software Development Diploma in Web Development Diploma in Data Metrics

STUDENT NUMBERS

35 28 39

LECTURER

Mr Jones Mrs Smith Mr Ntsinga

   In your main class must include a static method to handle the printing of the course report:

COURSE REPORT

Course Diploma in data metrics

Lecturer Mr Ntsinga

venue : venue 1

Would you like to exit the application?Enter (y) to use the exit or any other key to continue(JOptionPane input-must be a while loop)


Write a C++ program which perform the following:

1. Create a Class Sequence

2. Create a Private Static Data Member and initialize it with value 

zero

3. Create a Public Static Member Function, funcStatic( ) to access 

the static data member

4. Now, access the static member function in Main(), and using 

Constructor print the following sequence:

0 1 3 6 10 15 21 28


Write a C++ program which perform the following:

1. Create a Class factorial

2. Create Private Member Variable and initialize it with Member 

initialization list and with value zero

3. Now, take inputs from user

4. Create a Public Member Function Calculate( ) outside the class, 

to calculate the factorial of a given input

5. Create another Public Member Function Result( ) outside the 

class, to print the results on screen

6. Now, create a constant object of the class which perform following: 

a. Passes the values to the Calculate( ) function 

b. Call the Result( ) function to show result


Write a C++ program which perform the following:

1. Create a Class factorial

2. Create Private Member Variable and initialize it with Member

initialization list and with value zero

3. Now, take inputs from user

4. Create a Public Member Function Calculate( ) outside the class,

to calculate the factorial of a given input

5. Create another Public Member Function Result( ) outside the

class, to print the results on screen

6. Now, create a constant object of the class which perform following:

a. Passes the values to the Calculate( ) function

b. Call the Result( ) function to show result


Area of Largest Rectangle in Histogram


Given an list of integer

heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
Input

The input will be a single line containing space-separated integers, denoting the heights of the bars.

Output

The output should be a single line containing the area of the largest rectangle in the rectangle.

Explanation

For example, if the given list of numbers are

2 1 5 6 2 3 , when they are drawn adjacent to each other according to their heights, the histogram will be like The largest rectangle can be found in between 5 and 6, which is 10.


Sample Input 1

2 1 5 6 2 3


Sample Output 1

10


Sample Input 2

65 87 96 31 32 86 57 69 20 42


Sample Output 2

248




Define a class Fixed_Deposit with the following specifications, the program uses three overloaded constructors. The parameter values to these constructors are provided at run time. The user can provide input in the following forms.


1. Amount, period and interest in decimal form.


2. Amount, period and interest in percent form.


3. Amount and period.


PRIVATE DATA MEMBERS:


P_Amount long int type Years integer type Rate float type R_value float type


PUBLIC MEMBER FUNCTIONS:


Fixed_Deposit() Null constructor


Fixed_Deposit(p, y, r=0.12) Parameterized constructor with default arguments to accept values for P_Amount, Years and Rate(in Percent e.g., 0.12, 0.09)


Fixed_Deposit(p, y, r) Parameterized constructor with default arguments to accept values for P_Amount, Years and Rate(in Decimal e.g, 12%, 8%)


display() Function to display the P_Amount and R_Value


~Fixed_Deposit() Destructor to destroy the data objects


Directories in your current workspace

\Home

Files in your current workspace

File Name


Write a program that will calculate a student's year marks for all his subjects. The program must read the subject code, the assignment marks for two assignments and the percentage that each assignment contributes towards the year mark, for each subject that a student is registered for. Create an input file called assignments.dat


Bob a builder has come to you to build a program for his construction business. He needs to determine the square footage of a room in order to buy materials and calculate costs. Bob charges $425 per square metre. The program is going to ask the user to enter the name of a room. It will then ask for the width and length of the room (in meters) to be built. The program will calculate the room area and use this information to generate an approximate cost. Your program will display the room, the total area and the approximate cost to the screen. Using Pseudocode, develop an algorithm for this problem.  


Define the class Employee which has ID,name, DOB. Define the default constructor, member functions get_data() for taking the ID,name and DOB of the Employee, print() for displaying the data of Employee.Create an array of employee of size N and write the friend function sort() which sorts the array of employee according to their ID.


LATEST TUTORIALS
APPROVED BY CLIENTS