Develop the following class: Class Name: ImprovedArrayBasedStack Access Modifier: public Implements: ImprovedStackInterface Instance variables Name: top Access modifier: private Data type: int Name: stack Access modifier: private Data type: T[] (an array of parameterized type) Constructors Name: ImprovedArrayBasedStack Access modifier: public Parameters: none (default constructor) Task: sets the value of top to -1 sets the stack to refer to an array of Objects with 100 elements which are type cast to T[] Name: ImprovedArrayBasedStack Access modifier: public Parameters: size (data type int) Task: sets the value of top to -1 sets the stack to refer to an array of Objects with the number of elements equal to the size parameter which are type cast to T[] Methods Name: push Access modifier: public Parameters: item (data type T, parameterized type) Return type: void Throws: StackFullException Task: if the value of top is less than the length of the stack minus 1 then increase the value of top by 1 and place the item at the top of the stack, otherwise throw a StackFullException with the message "Not enough room for one item" Name: push Access modifier: public Parameters: item1 (data type T, parameterized type), item2 (data type T, parameterized type) Return type: void Throws: StackFullException Task: if the value of top is less than the length of the stack minus 2, then increase the value of top by 1 and place item1 at the top of the stack, then increase the value of top by 1 and place item2 at the top of the stack, otherwise throw a StackFullException with the message "Not enough room for two items" Name: pop Access modifier: public Parameters: none Return type: void Throws: StackEmptyException Task: if the value of top is greater than -1 then remove the item at the top of the stack by replacing it with null and decrease the value of top by 1, otherwise throw a StackEmptyException with the message "No item to remove" Name: doublePop Access modifier: public Parameters: none Return type: void Throws: StackEmptyException Task: if the value of top is greater than 0, then remove the item at the top of the stack by replacing it with null and decrease the value of top by 1, then remove the item at the top of the stack by replacing it with null and decrease the value of top by 1, otherwise throw a StackEmptyException with the message "There are less than two items in the stack" Name: top Access modifier: public Parameters: none Return type: T (parameterized type) Throws: StackEmptyException Task: if the value of top is greater than -1 then return the item at the top of the stack, otherwise throw a StackEmptyException with the message "Top attempted on an empty stack"
In: Computer Science
This is a tableau question.
| Year | Sales |
| 2005 | 49387 |
| 2006 | 53412 |
| 2007 | 56783 |
| 2008 | 58436 |
| 2009 | 59994 |
| 2010 | 61515 |
| 2011 | 63182 |
| 2012 | 67989 |
| 2013 | 70448 |
| 2014 | 72601 |
| 2015 | 75482 |
| 2016 | 78341 |
| 2017 | 81111 |
| 2018 | 82517 |
| 2019 | 83275 |
| 2020 | 84005 |
I. (a) Determine the trend line using both linear and two nonlinear equations Hint: You can choose any two of the nonlinear options in edit trend lines within Tableau. (b) Write down the equations (coefficients). Hint: Double click on trend line and click on describe the model.
II. Which trend line would you suggest? Why?
III. Estimate the sales for 2022. Does this seem like a reasonable estimate based on historical data? (Hint: Show Me — first icon on the left hand side)
IV. Check the quality of the forecast prepared by Tableau. Also, Provide Mean Absolute Error (MAE), and the Mean Absolute Percentage Error (MAPE). Hint: one click on forecast area with the right button of your mouse, then describe forecast and check first Summary and later Models.
V. Prepare a dashboard with 4 sheets: Sheet 1 for the trend line using linear function, Sheet 2 for the trend line using one of the nonlinear function of your choice, Sheet 3 for the trend line using another nonlinear function of your preference and Sheet 4 for Forecasting.
In: Statistics and Probability
Problem 9-3
AFN Equation
Broussard Skateboard's sales are expected to increase by 15%
from $7.2 million in 2015 to $8.28 million in 2016. Its assets
totaled $3 million at the end of 2015. Baxter is already at full
capacity, so its assets must grow at the same rate as projected
sales. At the end of 2015, current liabilities were $1.4 million,
consisting of $450,000 of accounts payable, $500,000 of notes
payable, and $450,000 of accruals. The after-tax profit margin is
forecasted to be 3%. Assume that the company pays no dividends.
Under these assumptions, what would be the additional funds needed
for the coming year? Do not round intermediate calculations. Round
your answer to the nearest dollar.
$
Why is this AFN different from the one when the company pays
dividends?
-Select-IIIIIIIVVItem 2
I. Under this scenario the company would have a
higher level of retained earnings which would increase the amount
of additional funds needed.
II. Under this scenario the company would have a
higher level of retained earnings but this would have no effect on
the amount of additional funds needed.
III. Under this scenario the company would have a
lower level of retained earnings which would reduce the amount of
additional funds needed.
IV. Under this scenario the company would have a
lower level of retained earnings but this would have no effect on
the amount of additional funds needed.
V. Under this scenario the company would have a
higher level of retained earnings which would reduce the amount of
additional funds needed.
In: Finance
Camille Sikorski was divorced in 2016. She currently provides a home for her 15-year-old daughter, Kaly. Kaly lived in Camille’s home, which she owns, for the entire year, and Camille paid for all the costs of maintaining the home. She received a salary of $52,500 and contributed $4,100 of it to a qualified retirement account (a for AGI deduction). She also received $5,500 of alimony from her former husband. Finally, Camille paid $2,600 of expenditures that qualified as itemized deductions.
i. What is Camille’s Gross Income?
ii. What is Camille’s Adjusted Gross Income?
iii. Should Camille take itemized deductions or the standard deduction? How much?
iv. Does Kay qualify as Camille’s dependent? Explain why.
v. What is Camille’s filing status?
vi. What is Camille’s allowable deduction from AGI?
vii. What is Camille’s income tax liability before applying any applicable tax credits?
2. Assume the original facts but now suppose Camille’s daughter, Kaly, is 25 years old and a full-time student. Kaly’s gross income for the year was $5,200. Kaly provided $3,120 of her own support, and Camille provided $5,200 of support.
i. Does Kaly qualify as Camille’s dependent? Explain your answer.
ii. What is Camille’s filing status?
iii. What is Camille’s allowable deduction from AGI?
iv. What is Camille’s Income tax liability before applying any applicable tax credits?
In: Accounting
need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you..
Q3:
You have been hired to design a database for prescriptions for RX pharmacies and your first job now is to design an ER model for this database using the following description of that world.
i. patients are identified by their SSN and have other attributes as names, addresses, and ages.
ii. Doctors are identified by their SSN and have other attributes as names, specialty, and years of experience.
iii. Each pharmaceutical company is identified by name and has a phone number.
iv. For each drug, the trade name and formula must be recorded. Each drug is sold by a given pharmaceutical, and the trade name identifies a drug uniquely from among the products of that company. If a pharmaceutical company is deleted, you need not keep track of its products any longer.
v. Each pharmacy sells several drugs and has a price for each. A drug could be sold at several pharmacies, and the price could vary from one pharmacy to another.
vi. Doctors prescribe drugs for patients. A doctor could prescribe one or more drugs for several patients, and a patient could obtain prescriptions from several doctors. Each prescription has a date and a quantity associated with it. You can assume that if a doctor prescribes the same drug for the same patient more than once, only the last such prescriptions needs to be stored.
vii. Pharmaceutical companies have contracts with pharmacies. A pharmaceutical company can have contracts with several pharmacies and a pharmacy can have contracts with several pharmaceutical companies. For each contract, you need to store a start date, an end date and the contract text.
viii. Pharmacies appoint a supervisor for each contract. There must always be a supervisor for each contract.
Hint: Present the conceptual design first, showing (1) all the entities and their attributes, (2) all the relationships and their attributes, (3) all the constraints before drawing your ER.
|
Specific Requirement /Constraint Type |
Requirements and Constraints from the ER diagram |
|
Entities and attributes in ER (1 Mark) |
|
|
Relationships and attributes in ER (0.75 Mark) |
|
|
Interpretation of each of the constraints represented on the edge labels in ER (0.75 Mark) |
ER Diagram goes next: (1 Mark)
You have to draw it digitally and attach. Note that in the ER diagram, the foreign key attributes that are part of the relationship schemas are not explicitly listed with the relationship but inherited from the entity the relationships are connected to.
Ans.
In: Computer Science
HW 8-1a
1.) Referring to the UML class diagram, create a program that utilizes the Student class.
- id : Integer
- units : Integer
- name : String
+ Student ( ) :
+ Student (id : Int, name : String, units : Int) :
+ ~Student( ) :
+ setID(id : Integer) : void
+ setName(name: String) : void
+ setUnits(units : Integer ) : void
+ displayRecord() : void
2.) Include 3 files:
- Source.cpp
- Student.h
- Student.cpp
3.) In main(), declare two objects of Student type, named s1 and s2.
4.) In main(), the s1 object calls its displayRecord() function. Here is the output:
ID: 0
Name:
Units: 0
5.) Then in main(), the s2 object calls its displayRecord() function. Here is the output:
ID: 100
Name: Tom P. Lee
Units: 12
6.) Then in main(), use the set functions to set to assign these values to the s1 object:
ID: 101
Name: John Lee Hooker
Units: 15
7.) Finally, the s1 object calls its displayRecord() function again. Here is the output:
ID: 100
Name: John Lee Hooker
Units: 15
/* OUTPUT
Here is student #1:
ID: 0
Name:
Units: 0
Here is student #2:
ID: 100
Name: Tom P. Lee
Units: 12
Here is student #1 after the set functions:
ID: 100
Name: John Lee Hooker
Units: 15
1) Referring to the following UML class diagram, create a program that utilizes three class specifications:
Student, UnderGrad, and Grad
- Include these 7 files in your project:
- main.cpp
- Student.h
- Student. cpp
- UnderGrad.h
- UnderGrad.cpp
- Grad.h
- Grad.cpp
2.) In main(), declare two objects of UnderGrad and Grad type, respectively, as show below:
int main()
{
UnderGrad underGrad(100, 9, "Tom Lee", "Freshman");
Grad grad(101, 12, "Jim Jones", "PHD");
3.) In main(), the object, underGrad, calls its displayRecord() function. Here is the output:
ID: 100
Name: Tom Lee
Units: 9
Class: Freshman
4.) In main(), the object, grad, calls its displayRecord() function. Here is the output
of the function:
ID: 101
Name: Jim Jones
Units: 12
Degree: PHD
5.) Then, in main(), the object, grad, calls its setUnits() function, and changes the number of units
from 12 to 15.
6.) Finally, in main(),the object, grad, calls its displayRecord() function. Here is the output
of the function:
ID: 101
Name: Jim Jones
Units: 15 ß (Units has changed to 15)
Degree: PHD
Please make a code on C++ language, and please add comments for each codes.
In: Computer Science
C++ only please
Description
A hash table is a data structure that is used to store keys/value pairs. It is perfect to use when you have a large amount of directory-type information and the operations you need to perform are to insert, delete, print, and search.
I am giving you all a lot more freedom in this program in that the value held in your hash table can be a pointer to any object created from your own custom class.
Files to Be Included In Your Submission
HashTable.h – header file containing your HashTable class template.
HashEntry.h – header file containing your HashEntry class template.
Classname.h – the specification header file containing your class declaration (name it the same name as your class)
Classname.cpp – the implementation file for your class (name it the same name as your class)
dataFile.txt – a text file containing the data specific to the class you create. It should have enough data to create 10 objects. (you get 10 points subtracted if you forget to do this!)
Main.cpp – contains the main function and any additional functions you created to make the program run
main program (main.cpp)
Must contain the main function as well as four other functions.
The main function should DYNAMICALLY create a new HashTable
object of size 10, which should be created with the template type
being a pointer to an object of your custom class.
HashTable *myTable = new HashTable(10);
You should have a menu of options to add data from a file, add one object manually, search for an object, delete an object, print the hash table, or end the program.
Validate the user’s choice.
Call the appropriate function depending on their choice.
You should have one function that will read in data from the file, DYNAMICALLY create an object of your custom class type, and then add this object to the hash table.
You should have another function that will allow the user to enter in an object’s data manually and then create an object from this data, and then add to the hash table.
The third function should allow the user to search for an object in the hash table.
The forth function should allow a user to delete an object from the hash table.
YOUR CUSTOM CLASS (CLASSNAME.H & CLASSNAME.CPP)
Whatever you choose for your class, your objects created from this class MUST have an integer idNum, (which will be used as the key in the hash table) and at least two other attributes. You should write appropriate functions for this class that you will need. You should also have a function that will overload the << (insertion operator) so that the HashTable class can print out your object data in the way that you want.
HASH TABLE TEMPLATE CLASS (HASHTABLE.H)
Your HashTable class must be a template class. The attributes include an integer table size and a pointer to an array of pointers to HashEntry.
You must implement the following functions for HashTable class:
Constructor – dynamically allocate the hash table of the parameter size and initialize other variables as necessary.
Destructor – release memory that was dynamically allocated in the HashTable class
T getValue(int key) – send in a key, return the value in the hash table at that key
void putValue(int key, T value) – inserts into the hash table using the hash function key%10.
void removeValue(int key) – removes a value at the given key in the hash table
void printHashTable() – prints out the hash table in a way that is easy to see which bucket objects were placed in and also indicates which buckets are still NULL
HASH ENTRY TEMPLATE CLASS (HASHENTRY.H)
Your HashEntry class must be a template class, which describes an entry into the hash table. The attributes include an integer key, and the value is of the template type. Also, since the HashTable class will be using chaining, then you will also have a pointer to the next HashEntry as an attribute.
You must implement the following functions for HashEntry class:
Constructor – initializes the key, value, and next pointer. The key & value is sent to the constructor
Getter functions (to get the key, to get the value, to get next pointer value)
Setter functions (setNext & setValue)
Sample Output (I used the creature class for my class)
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 1
Entering creature with ID 797 and name Banshee
Entering creature with ID 841 and name Beholder
Entering creature with ID 988 and name Mike Wazowski
Entering creature with ID 412 and name Sasquatch
Entering creature with ID 358 and name Troll
Entering creature with ID 325 and name Unicorn
6 creatures from creatureFile.txt have been added to the hash table.
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 2
KEY: Siren
Invalid key. Must be an integer.
KEY: 111
NAME: Siren
DESCRIPTION: Beautiful, horrible monster
LIFE POINTS: 3945
HIT POINTS: 344
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 5
----------
BUCKET 0 NULL
BUCKET 1 ---->ID: 841, NAME: Beholder---->ID: 111, NAME: Siren
BUCKET 2 ---->ID: 412, NAME: Sasquatch
BUCKET 3 NULL
BUCKET 4 NULL
BUCKET 5 ---->ID: 325, NAME: Unicorn
BUCKET 6 NULL
BUCKET 7 ---->ID: 797, NAME: Banshee
BUCKET 8 ---->ID: 988, NAME: Mike Wazowski---->ID: 358, NAME: Troll
BUCKET 9 NULL
----------
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 2
KEY: 781
NAME: Pumpkin Face
DESCRIPTION: Horrible pumpkin-looking monster who likes to eat children.
LIFE POINTS: 321
HIT POINTS: 3945
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 5
----------
BUCKET 0 NULL
BUCKET 1 ---->ID: 841, NAME: Beholder---->ID: 111, NAME: Siren---->ID: 781, NAME: Pumpkin Face
BUCKET 2 ---->ID: 412, NAME: Sasquatch
BUCKET 3 NULL
BUCKET 4 NULL
BUCKET 5 ---->ID: 325, NAME: Unicorn
BUCKET 6 NULL
BUCKET 7 ---->ID: 797, NAME: Banshee
BUCKET 8 ---->ID: 988, NAME: Mike Wazowski---->ID: 358, NAME: Troll
BUCKET 9 NULL
----------
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 3
What is the key of the creature you are searching for? 3
There are no creatures with that key in the table.
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 3
What is the key of the creature you are searching for? 358
ID: 358
NAME: Troll
DESCRIPTION:
Ugly and big. Sometimes smell bad.
LIFE POINTS: 1500
HIT POINTS: 80
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 4
The following is a list of all the creatures you take care of:
----------
BUCKET 0 NULL
BUCKET 1 ---->ID: 841, NAME: Beholder---->ID: 111, NAME: Siren---->ID: 781, NAME: Pumpkin Face
BUCKET 2 ---->ID: 412, NAME: Sasquatch
BUCKET 3 NULL
BUCKET 4 NULL
BUCKET 5 ---->ID: 325, NAME: Unicorn
BUCKET 6 NULL
BUCKET 7 ---->ID: 797, NAME: Banshee
BUCKET 8 ---->ID: 988, NAME: Mike Wazowski---->ID: 358, NAME: Troll
BUCKET 9 NULL
----------
What is the ID of the creature you wish to remove?
CREATURE ID: 358
You have removed the creature.
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 5
----------
BUCKET 0 NULL
BUCKET 1 ---->ID: 841, NAME: Beholder---->ID: 111, NAME: Siren---->ID: 781, NAME: Pumpkin Face
BUCKET 2 ---->ID: 412, NAME: Sasquatch
BUCKET 3 NULL
BUCKET 4 NULL
BUCKET 5 ---->ID: 325, NAME: Unicorn
BUCKET 6 NULL
BUCKET 7 ---->ID: 797, NAME: Banshee
BUCKET 8 ---->ID: 988, NAME: Mike Wazowski
BUCKET 9 NULL
----------
CREATURE MANAGEMENT MENU
1. Add Creatures From File
2. Add Creature Manually
3. Search for Creature
4. Delete a Creature
5. Print Hash Table
6. End Program
CHOOSE 1-6: 6
GOODBYE!!
In: Computer Science
The demand for subassembly S is 100 units in week 7. Each unit of S requires 1 unit of T and 2 units of U. Each unit of T requires 1 unit of V, 2 units of W, and 1 unit of X. Finally, each unit of U requires 2 units of Y and 3 units of Z. One firm manufactures all items. It takes 2 weeks to make S, 1 week to make T, 2 weeks to make U, 2 weeks to make V, 3 weeks to make W, 1 week to make X, 2 weeks to make Y, and 1 week to make Z.
On-hand inventory information is given as below:
|
ITEM |
ON-HAND INVENTORY |
ITEM |
ON-HAND INVENTORY |
|
S |
20 |
W |
30 |
|
T |
20 |
X |
25 |
|
U |
40 |
Y |
240 |
|
V |
30 |
Z |
40 |
In: Other
a) Mario Barnotoli wants to buy designer furniture from Poland for his mansion in Roma, Italy. Current spot rate is PLN 4.2555/EUR and the price for each set of designer furniture is PLN30,000. The annual inflation over the coming year for Poland and Italy are expected to be 6.5% and 2.5% per annum respectively. Assume purchasing power parity holds. How much EUR would Mario needs if he intends to purchase three sets of Polish designer furniture one year from now?
b) S. Krisnamoorthy is planning to purchase his dream motorcycle, a Harley V-twin next year. The Harley V-twin is currently selling at USD 12,500 in United States. However, S.Krisnamoorthy can directly purchase his dream motorcycle in MYR from Harley Davidson of Kuala Lumpur. The current spot rate is MYR4.200/USD and the current inflation rate in United States is 2% whilst in Malaysia is 5%. Assuming 60% complete pass through, what will the price of Harley V-twin be in MYR one year from now?
In: Accounting
Please assist with the following question:
5.
A simple linear regression equation relates V and S as follows:
V = a + b*S
The linear regression in problem 1 is estimated using 62 observations on V and S. The least-squares estimate of b is –21.749, and the standard error of the estimate is 9.10. Perform a t-test for statistical significance at the 5 percent level of significance
a. There are ______degrees of freedom for the t-test.
b. The value of the t-statistic is ______. The critical t-value for the test is ______.
c. Is statistically significant? Explain.
d. The p-value for the t-statistic is ______. (Hint: In this problem, the t-table provides the answer.) The p-value gives the probability of rejecting the hypothesis that ______(b = 0, b > 0, b < 0) when b is truly equal to ______. The confidence level for the test is ______ percent.
e. What does it mean to say is statistically significant at the 5 percent significance level?
f. What does it mean to say is statistically significant at the 95 percent confidence level?
g. Explain the difference between the level of confidence differ from the level of significance?
In: Statistics and Probability