Questions
Visual Basic This assessment will cover the Programming fundamentals of the Integrated Development Environment(IDE) found in...

Visual Basic

This assessment will cover the Programming fundamentals of the Integrated Development Environment(IDE) found in Chapters 1-7 of the assigned text. In this assignment, you will demonstrate the use of tools explored so far within the course. It is the High Totals Game activity found in the Case Projects section of your book. Requirements: Copy/paste the VB code into a Microsoft Word document. You are also required to submit enough screenshots of the output to show that all work has been completed.

Create an application that can be used to practice adding, subtracting, multiplying, and dividing numbers. The application should display a math problem on the screen and then allow the student to enter the answer and also verify that the answer is correct. The application should give the student as many chances as necessary to answer the problem correctly. The math problems should use random integers from 1 through 20, inclusive. The subtraction problems should never ask the student to subtract a larger number from a smaller one. The division problems should never ask the student to divide a smaller number by a larger number. Also, the answer to the division problems should always result in a whole number. The application should keep track of the number of correct and incorrect responses made by the student. The interface should include a button that allows the user to reset the counters for a different student.

The High Total game requires two players. The application’s interface should allow the user to enter each player’s name. When the user clicks a button, the button’s Click event procedure should generate two random numbers for player 1 and two random numbers for player 2. The random numbers should be in the range of 1 through 20, inclusive. The procedure should display the four numbers in the interface. It should also total the numbers for each player and then display both totals in the interface. If both totals are the same, the application should display the message “Tie”. If player 1’s total is greater than player 2’s total, it should display the message “player 1’s name won”. If player 2’s total is greater than player 1’s total, it should display the message “player 2’s name won”. The application should keep track of the number of times player 1 wins, the number of times player 2 wins, and the number of ties. The interface should also include a button that allows the user to reset the counters and interface for a new game.

In: Computer Science

Assignment Steps Resources: Microsoft ExcelÂź, Signature Assignment Databases, Signature Assignment Options, Part 3: Inferential Statistics Scenario:...

Assignment Steps Resources: Microsoft ExcelÂź, Signature Assignment Databases, Signature Assignment Options, Part 3: Inferential Statistics Scenario: Upon successful completion of the MBA program, say you work in the analytics department for a consulting company. Your assignment is to analyze one of the following databases: Manufacturing Hospital Consumer Food Financial Select one of the databases based on the information in the Signature Assignment Options. Provide a 1,600-word detailed, statistical report including the following: Explain the context of the case Provide a research foundation for the topic Present graphs Explain outliers Prepare calculations Conduct hypotheses tests Discuss inferences you have made from the results This assignment is broken down into four parts: Part 1 - Preliminary Analysis Part 2 - Examination of Descriptive Statistics Part 3 - Examination of Inferential Statistics Part 4 - Conclusion/Recommendations Part 1 - Preliminary Analysis (3-4 paragraphs) Generally, as a statistics consultant, you will be given a problem and data. At times, you may have to gather additional data. For this assignment, assume all the data is already gathered for you. State the objective: What are the questions you are trying to address? Describe the population in the study clearly and in sufficient detail: What is the sample? Discuss the types of data and variables: Are the data quantitative or qualitative? What are levels of measurement for the data? Part 2 - Descriptive Statistics (3-4 paragraphs) Examine the given data. Present the descriptive statistics (mean, median, mode, range, standard deviation, variance, CV, and five-number summary). Identify any outliers in the data. Present any graphs or charts you think are appropriate for the data. Note: Ideally, we want to assess the conditions of normality too. However, for the purpose of this exercise, assume data is drawn from normal populations. Part 3 - Inferential Statistics (2-3 paragraphs) Use the Part 3: Inferential Statistics document. Create (formulate) hypotheses Run formal hypothesis tests Make decisions. Your decisions should be stated in non-technical terms. Hint: A final conclusion saying "reject the null hypothesis" by itself without explanation is basically worthless to those who hired you. Similarly, stating the conclusion is false or rejected is not sufficient. Part 4 - Conclusion and Recommendations (1-2 paragraphs) Include the following: What are your conclusions? What do you infer from the statistical analysis? State the interpretations in non-technical terms. What information might lead to a different conclusion? Are there any variables missing? What additional information would be valuable to help draw a more certain conclusion?

In: Math

Instructions: Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format...

Instructions:

Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format ïŹle (.rtf), Word document (.doc), or ASCII text ïŹle (.txt). For problem 6 submit an excel sheet containing your chart.

4. (40 points) Determine the number of statement executions (precise big-Oh) for each of the following sample code, as described in the lecture. Your answers should be in the form of a Big-Oh polynomial (e.g., O(3N2 + 7N + 6)).

Sample #1:

for (int i = 0; i < n; i++)

{

   sum += i;

}

int j = 0;

while (j < n)

{

    sum--;

    j++;

}                        

*************************************************************

Sample #2:

int sumi=0;

int sumj;

int sumk;

for (int i=0; i< n; i++)

{

   sumi++;

   for (int j =0; j< i; j++)

{

sumj++;

      for (int k=0; k<j; k++)

sumk++

}

}

*****************************************************

Sample #3

int sum=0;

for (int i=0; i<n; i++)   

if (i % 2 =0)

sum++;    //% is the modulo operation

*****************************************************

Sample #4:

for (int i = 0; i < n; i++)

{

   sum += i;  

}

for (int j = 0; j < n; j++)

{

    for (int k = 0; k < n; k++)

   {

    sum--;

   }

}                             

***************************************************************

Sample #5:

for (int i = 0; i < n; i++)

{

for (int j = 0; j < n; j++)

{

      for (int k = j; k < n; k++)

      {

        sum += j;         

      }

   }                   

}

************************************************************************

   

5. (16 points) determine the order of magnitude for method 1 implemented in java as below. This method sorts an array of integers in a descending order. Unlike the previous question, you do not need to count the total number of statement executions to come up with a precise big-Oh; instead, you can use the shortcut rules covered in the lecture for computing the big-Oh. Notice that method 1 includes a statement that calls method 2.

     public static void method1(int[] array, int n)

      {

          for (int index=0; index<n ; index++ )

          {     

                 int mark = method2(array, index, n-1);

                 int temp= array[index];

                 array[index] = array[mark];

                 array[mark] = temp;

           }

       }

      

       public static int method2(int[]array, int first, int last)

       {

              int max= array[first];

              int indexOfMax= first;

              for (int index=first+1; index<=last; index++)

                     if(array[index]>max)

                     {

                           max= array[index];

                           indexOfMax = index;

                     }

              return indexOfMax;

       }

In: Computer Science

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any...

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any char array passed into the functions will contain valid, null-terminated data. Your functions must have the signatures listed below.

1. This function returns the last index where the target char can be found in the string. it returns -1 if the target char does not appear in the string. For example, if s is “Giants” and target is ‘a’ the function returns 2.

int lastIndexOf(char *s, char target)

2. This function alters any string that is passed in. It should reverse the string. If “flower” gets passed in it should be reversed in place to “rewolf”. To be clear, just printing out the string in reverse order is insufficient to receive credit, you must change the actual string to be in reverse order.

void reverse(char *s)

3. This function finds all instances of the char ‘target’ in the string and replaces them with ‘replacementChar’. It also returns the number of replacements that it makes. If the target char does not appear in the string it returns 0 and does not change the string. For example, if s is “go giants”, target is ‘g’, and replacement is ‘G’, the function should change s to “Go Giants” and return 2.

int replace(char *s, char target, char replacementChar)

4. This function returns the index in string s where the substring can first be found. For example if s is “Skyscraper” and substring is “ysc” the function would return 2. It should return -1 if the substring does not appear in the string.

int findSubstring(char *s, char substring[])

5. This function returns true if the argument string is a palindrome. It returns false if it is not. A palindrome is a string that is spelled the same as its reverse. For example “abba” is a palindrome. So is “hannah”, “abc cba”, and “radar”.

bool isPalindrome(char *s)

Note: do not get confused by white space characters. They should not get any special treatment. “abc ba” is not a palindrome. It is not identical to its reverse.

6. (OPTIONAL). This function should reverse the words in a string. A word can be considered to be any characters, including punctuation, separated by spaces (only spaces, not tabs, \n etc.). So, for example, if s is “The Giants won the Pennant!” the function should change s to “Pennant! the won Giants The”

void reverseWords(char *s)

Requirements

- You may use strlen(), strcmp(), and strncpy() if you wish, but you may not use any of the other C-string library functions such as strstr(), strncat(), etc.

- You will not receive credit for solutions which use C++ string objects, you must use C-Strings (null-terminated arrays of chars) for this assignment.

Please provide a sample output. thank you.

In: Computer Science

Task CPP Some information on the Internet may be encrypted with a simple algorithm known as...

Task CPP

Some information on the Internet may be encrypted with a simple algorithm known as rot13, which rotates each character by 13 positions in the alphabet. A rot13 cryptogram is a message or word in which each letter is replaced with another letter.

  • rot13 is an example of symmetric key encryption.

For example, the string

    the bird was named squawk

might be scrambled to form

    cin vrjs otz ethns zxqtop

Details and Requirements

  1. The test driver file lab3.cpp contains an incomplete implementation of the cipher as defined as the class Rot13.

  2. To allow user input a string, you need to override the stream extraction operator >> for the Rot13 class. The class contains the string field text that must be filled with the input text.

  3. The input string may only contain Latin lowercase letters and spaces. Write the method valid that checks if the input satisfies the above condition.
    • If the input contains valid characters then the method returns true value, otherwise it returns false.
  4. Write the method encrypt that encodes the input string using rot13 cipher. The encryption procedure replaces every occurrence of the character with the character 13 steps forward in the alphabet (in a circular way) . For example, a with n , b with o , and x with k, and so on.
    • Spaces are not scrambled.
    • You can transform characters to numbers which would allow to perform rotation transformation using addition/subtraction operations.
    • You can find numerical codes for letters in ASCII Table
  5. To output encrypted text on the screen, you need to override the stream insertion operator << for the Rot13 class.

Instructions

  • Use the file lab3.cpp which contains the testing driver code.
  • Implement Rot13 missing methods, so the program can be executed.
  • Test your program with the provided test input cases.

lab3.cpp

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;


class Rot13 {
friend ostream& operator<<(ostream&, const Rot13&);
friend istream& operator>>(istream&, Rot13&);

string text;
public:
Rot13();
bool valid();
void encrypt();
};

bool Rot13::valid() {
}

void Rot13::encrypt() {
}

ostream& operator<<(ostream& out, const Rot13& c) {
}

istream& operator>>(istream& in, Rot13& c) {
}

/*
Please enter the text: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Invalid input!
Please enter the text: slkgjskjg akjf Adkfjd fsdfj
Invalid input!
Please enter the text: abcdefghijkl mnopqrst uvwxyz
Encoded text: "nopqrstuvwxy zabcdefg hijklm"
*/
int main() {
Rot13 cipher;

cout << "Please enter the text: ";
cin >> cipher;
if (!cipher.valid()) {
cout << "Invalid input!" << endl;
return 1;
}
cipher.encrypt();
cout << "Encoded text: " << cipher << endl;
return 0;
}

In: Computer Science

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any...

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any char array passed into the functions will contain valid, null-terminated data. Your functions must have the signatures listed below.

1. This function returns the last index where the target char can be found in the string. it returns -1 if the target char does not appear in the string. For example, if s is “Giants” and target is ‘a’ the function returns 2.

int lastIndexOf(char *s, char target)

2. This function alters any string that is passed in. It should reverse the string. If “flower” gets passed in it should be reversed in place to “rewolf”. To be clear, just printing out the string in reverse order is insufficient to receive credit, you must change the actual string to be in reverse order.

void reverse(char *s)

3. This function finds all instances of the char ‘target’ in the string and replaces them with ‘replacementChar’. It also returns the number of replacements that it makes. If the target char does not appear in the string it returns 0 and does not change the string. For example, if s is “go giants”, target is ‘g’, and replacement is ‘G’, the function should change s to “Go Giants” and return 2.

int replace(char *s, char target, char replacementChar)

4. This function returns the index in string s where the substring can first be found. For example if s is “Skyscraper” and substring is “ysc” the function would return 2. It should return -1 if the substring does not appear in the string.

int findSubstring(char *s, char substring[])

5. This function returns true if the argument string is a palindrome. It returns false if it is not. A palindrome is a string that is spelled the same as its reverse. For example “abba” is a palindrome. So is “hannah”, “abc cba”, and “radar”.

bool isPalindrome(char *s)

Note: do not get confused by white space characters. They should not get any special treatment. “abc ba” is not a palindrome. It is not identical to its reverse.

6.This function should reverse the words in a string. Without using a second array. A word can be considered to be any characters, including punctuation, separated by spaces (only spaces, not tabs, \n etc.). So, for example, if s is “The Giants won the Pennant!” the function should change s to “Pennant! the won Giants The”.

void reverseWords(char *s)

Requirements

- You may use strlen(), strcmp(), and strncpy() if you wish, but you may not use any of the other C-string library functions such as strstr(), strncat(), etc.

- You will not receive credit for solutions which use C++ string objects, you must use C-Strings (null-terminated arrays of chars) for this assignment.

In: Computer Science

Use Workbench/Command Line to create the commands that will run the following queries/problem scenarios. Use MySQL...

Use Workbench/Command Line to create the commands that will run the following queries/problem scenarios.

Use MySQL and the Colonial Adventure Tours database to complete the following exercises.

1. List the last name of each guide that does not live in Massachusetts (MA).

2. List the trip name of each trip that has the type Biking.

3. List the trip name of each trip that has the season Summer.

4. List the trip name of each trip that has the type Hiking and that has a distance longer than 10 miles.

5. List the customer number, customer last name, and customer first name of each customer that lives in New Jersey (NJ), New York (NY) or Pennsylvania (PA). Use the IN operator in your command.

6. Repeat Exercise 5 and sort the records by state in descending order and then by customer last name in ascending order.

7. How many trips are in the states of Maine (ME) or Massachusetts (MA)?

8. How many trips originate in each state?

9. How many reservations include a trip price that is greater than $20 but less than $75?

10. How many trips of each type are there?

11. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the result by the number of persons included in the reservation. List the reservation ID, trip ID, customer number, and total price for all reservations where the number of persons is greater than four. Use the column name TOTAL_PRICE for the calculated field.

12. Find the name of each trip containing the word “Pond.”

13. List the guide’s last name and guide’s first name for all guides that were hired before June 10, 2013.

14. What is the average distance and the average maximum group size for each type of trip?

15. Display the different seasons in which trips are offered. List each season only once.

16. List the reservation IDs for reservations that are for a paddling trip. (Hint: Use a subquery.)

17. What is the longest distance for a biking trip?

18. For each trip in the RESERVATION table that has more than one reservation, group by trip ID and sum the trip price. (Hint: Use the COUNT function and a HAVING clause.)

19. How many current reservations does Colonial Adventure Tours have and what is the total number of persons for all reservations?

In: Computer Science

ABC Golf Corporation Assignment: ABC Golf Equipment Corporation has 500,000 shares outstanding and currently has no...

ABC Golf Corporation Assignment:

ABC Golf Equipment Corporation has 500,000 shares outstanding and currently has no debt. The company has a marginal tax rate of 35% and the firm’s stock price is $27 per share. The firm’s unlevered beta is 1.5, the risk-free rate of return is 5%, and the expected market return is 10%.

The company is thinking of issuing bonds and simultaneously repurchasing a portion of its stock. Because the company is issuing bonds to repurchase the stock, there is no anticipated change to the stock price as a result of the stock buyback. The bonds can be issued with a 6% coupon, and under the new proposed structure the debt to capital ratio would be 7%. If the company’s debt to capital ratio exceeds 25%, the cost of debt would increase to a max rate of 8%. Company mandates require that the company’s debt to equity ratio remains at less than 3.0 at all times. The firm’s earnings are not expected to grow over time. All of its earnings will be paid out as dividends.

Probability

EBIT ($)

0.05

-$1 Million

0.25

2.3 Million

0.40

4 Million

0.25

5.8 Million

0.05

6.1 Million

Use Excel for your calculations and answer the ten questions on the following pages. Your submission should consist of two files:

1) Submit a Word document clearly showing your solutions and how you achieved them

2) Also if possible please submit an Excel worksheet showing your spreadsheets that you used to calculate solutions.

Questions to answer:

1) Based on the given probabilities in the table above, what is the expected EBIT for ABC Golf Equipment Corporation?

2) If the market value equals the book value of the firm’s assets, what is the current market value of ABC Golf Equipment Corporation’s assets?

3) What is the current cost of equity to the firm?

4) Based on the current share price, what is the current dividend per share?

5) Based on the current share price, what is the current dividend yield?

6) If there is no change to the stock price as a result of the share repurchase, how much equity will shareholders own after the proposed capital restructuring?

7) After the proposed change in capital structure, how much debt will the company now carry?

8) Under these market conditions, what is the firm’s optimal debt to capital ratio for the firm?

9) What is the WACC at the optimal debt to capital ratio?

10) Under a new proposed tax cut, corporate tax rates would now be reduced to 21%. Explain how the new proposed tax plan affects the optimal capital structure. What would be the optimal capital structure under the new proposed tax plan?

In: Finance

As stated in the chapter, many different factors affect the running time of an algorithm. Your...

As stated in the chapter, many different factors affect the running time of an algorithm. Your task is to conduct experiments to see how sorting algorithms perform in different environments.


To construct this experiment you must have a program or two programs that sorts sets of data. The program or programs should sort a set of number using a quick sort and using a merge sort. To expedite this, example code that performs a quick sort and a merge sort have been provided.


You should conduct sets of experiments. Categorize your data in two major sections, one for merge sort results, one for quick sort results. Each section can be sub divided into criteria that you used to bench mark the sort.


Conduct benchmarking of quicksort and merge sort several times on the same system - once with as much software turned off a possible, and then with other programs running - Word, Excel, videos, etc. See if you can determine how different software or combinations of software running at the same time slow down the sorting algorithms the most. You might want to include an Internet connection in this test. Just as with the different software, How does a live connection to a network affect the running time of the algorithms?


Use Data Sets Starting at at 10,000,000 randomly generated numbers


All programming projects must have an associated Professional Lab Report submitted with in. A Lab Report must contain the minimum Requirements List Below


Template Workbook for Bench Marking Data

benchmarking.xlsx




Document Formatting

A document header - The Header section should contain your name
A document footer - The footer should contain a page number

Paragraphs Formatting should be formatted

1.5 line spacing
12 points before and after the paragraph

Character Formatting

Body Text should be 12 points
Segment Headers should be boldface

Submit a Project containing the Quick Sort Tool program you created to conduct the research. If the project contains the features of both programs, then only submit one project.

Submit a Project containing the Merge Sort Tool program you created to conduct the research. If the project contains the features of both programs, then only submit one project.

Submit an Excel Workbook containing the Bench Marking Data.

Submit a Lab Report for building your project tool.
Submit an Essay Report describing your work, your results, and your conclusions.Essays should follow the same formatting requirements as Lab Reports

In: Computer Science

Submission Question 3: Polymorphism Problem You are writing software for a company’s human resources department. As...

Submission Question 3: Polymorphism

Problem

You are writing software for a company’s human resources department. As part of the requirements, it would like to have a function that calculates the salary of an individual based on the position he or she holds, years of service, and hours worked.

This program will demonstrate the following:

  • How to create an abstract class,
  • How to overload a method,
  • How to use polymorphism to call functions on similar objects.

Solving the Problem

Step 1

The first thing that you must determine is what attributes are common to all employees and what methods they can share. Can salary be easily calculated by the same method without some additional input from the user? By using polymorphism, you can make one method that calculates salaries for different groups. First, determine the base class and what method needs to be implemented by the child classes. By making the calcSalary() method abstract, it will be a required method of the child classes.

Step 2

You can then define the child classes that inherit the shared attributes from the base Employee class but also inherit the requirement that they implement from the calcSalary() method. Each employee type will have a different set of attributes and a different method of calculating the salary, but the same method call will be used to calculate it.

Step 3

You can now create a list to hold all employee types and populate it.

Step 4

Because you used polymorphism in the classes, you can now use one loop to calculate and output the salaries of the employees.

Documentation Guidelines:

Use Python Programming. Use good programming style (e.g., indentation for readability) and document each of your program parts with the following items (the items shown between the '<' and '>' angle brackets are only placeholders. You should replace the placeholders and the comments between them with your specific information). Your cover sheet should have some of the same information, but what follows should be at the top of each program's sheet of source code. Some lines of code should have an explanation of what is to be accomplished, this will allow someone supporting your code years later to comprehend your purpose. Be brief and to the point. Start your design by writing comment lines of pseudocode. Once that is complete, begin adding executable lines. Finally run and test your program.

Deliverable(s):

Your deliverable should be a Word document with screenshots showing the source code and running results, and discuss the issues that you had for this project related to AWS and/or Python IDE and how you solved them for all of the programs listed above as well as the inputs and outputs from running them. Submit a cover sheet with the hardcopy of your work.

In: Computer Science