Write a C++ program using the information describe above that computes the maximum load in lbs(pounds) that can be placed at the end of an 8-foot (96 inches) 2” × 4” wooden beam so that the stress on the fixed end is 3000 lb/in2 .
Program that will create 2 one-dimensional arrays then performs multiplication of integers entered into the array .sum of all integers in Array 1, Array 2 and the sum of all products
sample:
#include<stdio.h>
#include<conio.h>
main()
{
int arra[5], arrb[5], i, y=3,sum[5];
clrscr();
gotoxy (5,2); printf("Array A");
for(i=0; i<=4; i++)
{
gotoxy(8, y);scanf("%d", &arra[i]);
y++;
}
y=y-5;
gotoxy (20,2); printf("Array B");
for(i=0; i<=4; i++)
{
gotoxy(30, y);scanf("%d", &arrb[i]);
y++;
}
for(i=0; i<=4; i++)
{
sum[i]=arra[i]+arrb[i];
}
gotoxy (60,2); printf("Sum");
y=y-5;
for(i=0; i<=4; i++)
{
gotoxy(60, y);printf("%d", sum[i]);
y++;
}
getch();
}
2.1 You are required to evaluate the performance of the selected algorithms from Question 1 by using
the following assumptions in your computation: (15)
ALGORITHM 1
True Positive = 65
True Negative = 70
False Positive = 80
False Negative = 90
ALGORITHM 2
True Positive = 75
True Negative = 80
False Positive = 40
False Negative = 45
Compute the following Machine Learning metrics by showing your working:
Accuracy
Precision
Recall
F1-Measure
2.2 Compare the performance of the selected algorithms from Question 1 based on the Accuracy and
Precision values. (5)
2.3 Contrast the performance of the selected algorithms based on the Recall and F1- Measure. (5)
In South Africa, Buses are used as one of the main transport servicesfor people in the country.
Everyday, they follow the same route from a particular town/city/shopping complex etc., to
another location point.
Create an application that uses a recursive function to:
Allow the bus driver to accept payments from passengers.
Check every bus stop to ensure that it knows whether or not a passenger should still
be in bus or off.
The system should:
use a recursive function to keep accepting passengers in each bus stop until the
second last stop.
be aware of how many stops are left.
Assume that there are seven bus stops from the starting point to the last point. (excluding the
starting and the last point)
Create an Investment class that contains fields to hold the initial value of an investment, the current value, the profit (calculated as the difference between current value and initial value), and the percent profit (the profit divided by the initial value). Include a constructor that requires initial and current values and a display function. Create a House class that includes fields for street address and square meter, a constructor that requires values for both fields, and a display function. Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes a constructor and a display function that calls the display functions of the parents. Write a main() function that declares a HouseThatIsAnInvestment and displays its values. Save the file as HouseThatIsAnInvestment.cpp
Among object-oriented languages, one feature that varies considerably is whether the language allows multiple inheritance. C++ does but Ada does not. Java takes a middle ground approach of allowing multiple inheritance of interfaces but not classes. Using a C++ example, illustrate some of the complexities that multiple inheritance introduces. How does C++ deal with them? Why does Java's middle ground approach offer some of the benefits of multiple inheritance while avoids its problems.
Implement a Linked List (LL) discussed above
including following operations.
◼ Insertion of node at any place in LL.
◼ Deletion of node at any place in LL
◼ Searching for a node at any place in LL
◼ Printing whole Linked List (LL)
◼ Checking emptiness of the LL
The manager of the Lakeview Hotel needs a program that evaluates and displays a guest's total bill. Each guest pays a room charge that is based on a per-night rate. For illustration if the per night rate is $100 and the guest stays two nights, the room charge is $200.Customer also can incur a one-time room service charge and a one-time telephone charge.