#ifndef DYNARR_H_INCLUDED #include "dynarr.h" #define DYNARR_H_INCLUDED #include <iostream>...

#ifndef DYNARR_H_INCLUDED #include "dynarr.h"
#define DYNARR_H_INCLUDED #include <iostream>
class dynArr using namespace std;
{
private: dynArr::dynArr()
int *data; {
int size; data = NULL;
public: size = 0;
dynArr(); }
dynArr(int); dynArr::dynArr(int s)
~dynArr(); {
void setValue(int, int); data = new int[s];
int getValue(int); size = s;

}; }
#endif // DYNARR_H_INCLUDED dynArr::~dynArr()

{
delete [] data;
}
int dynArr::getValue(int index)
{
//write the code
}
void dynArr::setValue(int index, int value)
{
//write the code
}

Using C++ modify the header and the source files. Add a member function void allocate(int s) which allows you to change the size of the array. Make sure that memory is not leaked.

Solved
COMPUTER SCIENCE 1 Answer Huy Lê Minh

Java laungage: Create class Employee. · Use static variable annualTaxRate to store ...

Create a class Employee.

  • Use static variable annual tax rate to store the annual tax rate for all employees. Also use another static variable inflationRate [0-1].
  • Use inline initialization for inflation rate = 0.3, whereas the annual tax rate is initialized using the following rule in a static init block.
  • If inflationRate is higher than 0.5, then annualTaxRate is 5%, else annualTaxRate is 10%.
  • Each object of the Employee class contains private instance variables name and salary indicating the employee name and monthly salary of the employee.
  • Provide constructor(s) and getter/setter methods. The constructor and getter/setter methods should use shadowing parameters names. (hint: use ‘this’ )
  • Provide method computeAnnualTax to calculate the monthly interest by multiplying the Annual salary by annual tax rate divided by 100 – this tax should be returned from computeAnnualTax.

 

  • Write class EmpTest for testing the Employee class
    • Create an employee object emp1 by calling constructors with appropriate values (salary = 20000).
    • Create another employee object emp2 having default salary (say 30000)
    • Input salary from the user and update the salary of emp2 to the new salary (say 50000).
    • Compute Annual tax for both the employees and display them in the test class.

in progress
Programming in Java 1 Answer Areeb Abbas

Java laungage: Create class Employee. · Use static variable annualTaxRate to store ...

java laungage:

Create class Employee.
· Use static variable annualTaxRate to store the annual tax rate for all employees. Also use another static variable inflationRate [0-1].
· Use inline initialization for inflationRate = 0.3, whereas annualTaxRate is initialized using the following rule in a static init block.
· If inflationRate is higher than 0.5, then annualTaxRate is 5%, else annualTaxRate is 10%.
· Each object of the Employee class contains private instance variables name and salary indicating the employee name and monthly salary of the employee.
· Provide constructor(s) and getter/setter methods. The constructor and getter/setter methods should use shadowing parameters names. (hint: use ‘this’ )
· Provide method computeAnnualTax to calculate the monthly interest by multiplying the Annual salary by annualTaxRate divided by 100 – this tax should be returned from computeAnnualTax.

} Write class EmpTest for testing the Employee class
} Create an employee object emp1 by calling constructors with appropriate values (salary = 20000).
} Create another employee object emp2 having default salary (say 30000)
2 / 2
} Input salary from user and update the salary of emp2 to the new salary (say 50000).
} Compute Annual tax for both the employees and display them in the test class.

***Update the employee class so that it contains another instance variable called netMonthlyIncome, which is defined as monthly salary minus(-) monthly income tax. Add a method to the class Employee called computeNetSalary to compute it.

Solved
COMPUTER SCIENCE 1 Answer Anas Younis

Software project decision point. You need to determine an interest rate to use—select an interes...

  1. Software project decision point.
    1. You need to determine an interest rate to use—select an interest rate and explain why you think this number should be used. Use it in your calculations in item 1.2.
    2. Given the information below on options 1 and 2, carry out three forms of analysis: breakeven, ROI, and NPV.
    3. Make a recommendation on which way to proceed, based on the TCO for each option.
  • Option 1: Purchase the FunSoft package: Cost $200,000 for software and $85,000 for hardware in year one; with $50,000 to customize it and a $40,000 annual licensing fee for the life of the contract. There will be an annual saving of $61,000 due to the layoff of a clerk.
  • Option 2: Purchase the SoftComm package, which will operate on the vendor’s hardware: Cost $250,000 for a five-year license, payable half up front and half during the first year of implementation. The maintenance contract, at $75,000 a year, includes all currently identified modifications to the software for the first three years. The clerk’s hours will be cut by half, for a saving of $25,000 a year.

In both cases, sales are expected to increase from the current $1 million a year, by 10% per year each year (over each year’s previous year’s sales) after full implementation.

Assume a five-year life for the software.

Solved
ACCOUNTING 1 Answer ĪØS・ LðVêßïRÐ

Problem #4: (a) Compute the Unit Hydrograph for the Effective rainfall-direct runoff storm as sum...

Problem #4: (a) Compute the Unit Hydrograph for the Effective rainfall-direct runoff storm as summarized below. 1.00 pm Time

Solved
Civil Engineering 1 Answer Annika Krömer