you have to write a program in JAVA to create the Standard Deviation (SD) of the sales for the past 10 years. The standard deviation gives the sales manager a full idea of how the market changed in the past 10 years. 1. Design an Input dialog box window which accepts last year’s sale from a drop down menu: Year 2017 2016 2015 For example, if last year’s sale selected is 2017, the SD will be calculated from 2008 to
Declare three arrays:
A, B and C each size 3
Read these numbers into A using for loop and cin : 1, 2, 3
Read these numbers into B using for loop and cin: -1, -2, -3
C is A + B . this means you need to add each element of the array A to corresponding element of array B and then C is the sum.
Print the elements of array C (three elements)
create an array (call it arr) of size 5
In a for loop , use scanf to read 5 numbers into your array
then use another for loop to add the 5 numbers in the array together and print the result.
You are required to write an C++ program that calculates the electricity bill of the customer during COVID 19 pandemic. The C++ program should take input from the user the followings
1. the number of units consumed
2. the billing month
The bill is calculated by the followings
If the number of units consumed are between 1 to 100 then the per unit price is Rs 100. If the number of units consumed is greater than 100 but less than 150, then the per unit price is Rs 200. If the number of units consumed is greater than 200 then the per unit price is 250 and an additional 5% tax on the total bill is incurred on the customer (Hint use nesting to solve this)
Create a class called Distance that has two data member feet as int type and inches as float type. Provide multiple constructors for the Distance class. One constructor should initialize this data to 0, and another should initialize it to fixed values. Also provide copy constructor to initialize Distance object with another object. Also provide get and set method for the class.
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
Design the class Vowel to find the number of vowels present in the given string. Define the constructor member function to assign the values and destructor member function to destroy the data objects
Define the classes using hierarchy inheritance. An organization has two types of employees: Regular and Adhoc are derived class. Regular employees get a salary which is Basic salary + DA + HRA where DA is 10% of basic and HRA is 30% of basic. Adhoc employees are daily wagers who get a salary which is equal to Number oh hours * Wages amount. The employee base class consisting of member variables such as name and empid. When a regular employee is created, basic salary must be a parameter. When Adhoc employee is created wages amount must be a parameter. Define the member functions for each class and the member function days( ) updates number of the Adhoc employee
The postage for ordinary post is Rs. 2.00 for the first 15 grams and Rs. 1.00 for each additional 10 grams. Write a C++ program to calculate the charge of postage for a post weighting N grams. Read the weights of N packets and display the total amount of postage using multiple inheritance.
* Base class-1: Member variables are name, source and destination.
* Base class-2: Member variables are no. of packets and weight.
* Derived class: Member functions display(), displays the name, source, destination, total weight and total amount.