Marketing

Assignment 04

G04 Integrated Marketing Communications

Directions:  Be sure to make an electronic copy of your answer before submitting it to Ashworth College for grading.  Unless otherwise stated, answer in complete sentences, and be sure to use correct English spelling and grammar.  Sources must be cited in APA format.  Your response should be four (4) pages in length; refer to the “Assignment Format” page for specific format requirements.

Answer the following questions.

Part A        List five (5) types of executional frameworks that can be used when developing an advertisement.

Part B        Describe how each of the (5) types of executional frameworks can be used in ad development.

Part C        Find an advertisement that meets the criteria for one of the types of executional frameworks. Fully explain your choice and discuss why that particular framework applies to the chosen ad’s development.

Part D        Find a second advertisement that meets the criteria for a different one of the types of executional frameworks. Fully explain your choice and discuss why that particular framework applies to the chosen ad’s development.

Programming

Improve the performance of the Java program by adding threads to the Sort.java file. Implement the threadedSort() method within the Sort class. (Reuse any of the existing methods by calling them as necessary from your threadedSort method. You may add additional methods to the Sort class, if necessary.)

Document your analysis as a short paper (1 page).

Main File (sort.java):

001import java.io.BufferedReader;

002import java.io.File;

003import java.io.FileReader;

004import java.io.IOException;

005import java.util.ArrayList;

006import java.util.logging.Level;

007import java.util.logging.Logger;

008 

009public class Sort {

010 

011  /**

012   * You are to implement this method. The method should invoke one or

013   * more threads to read and sort the data from the collection of Files.

014   * The method should return a sorted list of all of the String data

015   * contained in the files.

016   *

017   * @param files

018   * @return

019   * @throws IOException

020   */

021  public static String[] threadedSort(File[] files) throws IOException

022  {

023      String[] sortedData = new String[0];

024      SortThread[] sortThreads = new SortThread[files.length];

025      for (int i=0; i

026          sortThreads[i] = new SortThread(files[i]);

027          sortThreads[i].start();

028      }

029       

030      for (SortThread thread : sortThreads) {

031          try {

032              thread.join();

033          }

034          catch (InterruptedException ex){

035              Logger.getLogger(Sort.class.getName()).log(Level.SEVERE, null, ex);

036          }

037          return sortedData;

038      }

039      throw new java.lang.IllegalStateException(“Method not implemented”);

040  }

041   

042  private static class SortThread extends Thread {

043      private File file;

044      private String[] data;

045 

046       

047      public SortThread(File file) {

048          this.file = file;

049      }

050       

051      @Override

052      public void run() {

053          try {

054              data = Sort.getData(file);

055              for (int i = 0; i

056                  //Thread.sleep(100);               

057                 //I commented this out because it was wasting time

058                  //System.out.println(data[i]);

059                  //I commented this out because I didn’t want to display the entire files

060              }

061          }

062          catch (IOException ex) {

063              Logger.getLogger (Sort.class.getName()).log(Level.SEVERE, null, ex);

064          }

065    }

066  }

067   

068  /**

069   * Given an array of files, this method will return a sorted

070   * list of the String data contained in each of the files.

071   *

072   * @param files the files to be read

073   * @return the sorted data

074   * @throws IOException thrown if any errors occur reading the file

075   */

076  public static String[] sort(File[] files) throws IOException {

077 

078    String[] sortedData = new String[0];

079 

080    for (File file : files) {

081      String[] data = getData(file);

082      data = MergeSort.mergeSort(data);

083      sortedData = MergeSort.merge(sortedData, data);

084    }

085 

086    return sortedData;

087 

088  }

089  /**

090   * This method will read in the string data from the specified

091   * file and return the data as an array of String objects.

092   *

093   * @param file the file containing the String data

094   * @return String array containing the String data

095   * @throws IOException thrown if any errors occur reading the file

096   */

097  private static String[] getData(File file) throws IOException {

098 

099    ArrayList data = new ArrayList();

100    BufferedReader in = new BufferedReader(new FileReader(file));

101    // Read the data from the file until the end of file is reached

102    while (true) {

103      String line = in.readLine();

104      if (line == null) {

105        // the end of file was reached

106        break;

107      }

108      else {

109        data.add(line);

110      }

111    }

112    //Close the input stream and return the data

113    in.close();

114    return data.toArray(new String[0]);

115 

116  }

117}

Mergesort.java:

01public class MergeSort {

02   

03  // The mergeSort method returns a sorted copy of the

04  // String objects contained in the String array data.

05  /**

06   * Sorts the String objects using the merge sort algorithm.

07   *

08   * @param data the String objects to be sorted

09   * @return the String objects sorted in ascending order

10   */

11  public static String[] mergeSort(String[] data) {

12 

13    if (data.length > 1) {

14      String[] left = new String[data.length / 2];

15      String[] right = new String[data.length – left.length];

16      System.arraycopy(data, 0, left, 0, left.length);

17      System.arraycopy(data, left.length, right, 0, right.length);

18     

19      left = mergeSort(left);

20      right = mergeSort(right);

21     

22      return merge(left, right);

23       

24    }

25    else {

26      return data;

27    }

28     

29  }

30   

31  /**

32   * The merge method accepts two String arrays that are assumed

33   * to be sorted in ascending order. The method will return a

34   * sorted array of String objects containing all String objects

35   * from the two input collections.

36   *

37   * @param left a sorted collection of String objects

38   * @param right a sorted collection of String objects

39   * @return a sorted collection of String objects

40   */

41  public static String[] merge(String[] left, String[] right) {

42     

43    String[] data = new String[left.length + right.length];

44     

45    int lIndex = 0;

46    int rIndex = 0;

47     

48    for (int i=0; i

49      if (lIndex == left.length) {

50        data[i] = right[rIndex];

51        rIndex++;

52      }

53      else if (rIndex == right.length) {

54        data[i] = left[lIndex];

55        lIndex++;

56      }

57      else if (left[lIndex].compareTo(right[rIndex]) < 0) {

58        data[i] = left[lIndex];

59        lIndex++;

60      }

61      else {

62        data[i] = right[rIndex];

63        rIndex++;

64      }

65    }

66     

67    return data;

68     

69  }

70   

71}

SortTest.java:

01import java.io.File;

02import java.io.IOException;

03 

04/**

05 * The class SortTest is used to test the threaded and non-threaded

06 * sort methods. This program will call each method to sort the data

07 * contained in the four test files. This program will then test the

08 * results to ensure that the results are sorted in ascending order.

09 *

10 * Simply run this program to verify that you have correctly implemented

11 * the threaded sort method. The program will not verify if your sort

12 * uses threads, but will verify if your implementation correctly

13 * sorted the data contained in the four files.

14 *

15 * There should be no reason to make modifications to this class.

16 */

17public class SortTest {

18   

19  public static void main(String[] args) throws IOException {

20     

21    File[] files = {new File(“enable1.txt”), new File(“enable2k.txt”), newFile(“lower.txt”), new File(“mixed.txt”)};

22 

23    // Run Sort.sort on the files

24    long startTime = System.nanoTime();

25    String[] sortedData = Sort.sort(files);

26    long stopTime = System.nanoTime();

27    double elapsedTime = (stopTime – startTime) / 1000000000.0;

28     

29    // Test to ensure the data is sorted

30    for (int i=0; i

31      if (sortedData[i].compareTo(sortedData[i+1]) > 0) {

32        System.out.println(“The data returned by Sort.sort is not sorted.”);

33        throw new java.lang.IllegalStateException(“The data returned by Sort.sort is not sorted”);

34      }

35    }

36    System.out.println(“The data returned by Sort.sort is sorted.”);

37    System.out.println(“Sort.sort took ” + elapsedTime + ” seconds to read and sort the data.”);

38     

39    // Run Sort.threadedSort on the files and test to ensure the data is sorted

40    startTime = System.nanoTime();

41    String[] threadSortedData = Sort.threadedSort(files);

42    stopTime = System.nanoTime();

43    double threadedElapsedTime = (stopTime – startTime)/ 1000000000.0;

44     

45    // Test to ensure the data is sorted

46    if (sortedData.length != threadSortedData.length) {

47      System.out.println(“The data return by Sort.threadedSort is missing data”);

48      throw new java.lang.IllegalStateException(“The data returned by Sort.threadedSort is not sorted”);

49    }

50    for (int i=0; i

51      if (threadSortedData[i].compareTo(threadSortedData[i+1]) > 0) {

52        System.out.println(“The data return by Sort.threadedSort is not sorted”);

53        throw new java.lang.IllegalStateException(“The data returned by Sort.threadedSort is not sorted”);

54      }

55    }

56    System.out.println(“The data returned by Sort.threadedSort is sorted.”);

57    System.out.println(“Sort.threadedSort took ” + threadedElapsedTime + ” seconds to read and sort the data.”);

58     

59     

60  }

61   

62}

The error am getting:

run:The data returned by Sort.sort is sorted.Sort.sort took 2.072120353 seconds to read and sort the data.The data return by Sort.threadedSort is missing dataException in thread “main” java.lang.IllegalStateException: The data returned by Sort.threadedSort is not sortedat SortTest.main(SortTest.java:49)Java Result: 1BUILD SUCCESSFUL (total time: 3 seconds)

Physics

The well-fed ants of the Fourth North Creek Ant Colony maintain and adhere to a straight trail along the ground between the nearby picnic table and the hole leading to their underground nest. In the colony’s folklore, this trail has been known since ancient times as the

Geography

I REALLY NEED THIS DONE ASAP!

PLEASE READ ENTIRE INSTRUCTIONS BEFORE AGREEING TO DO THE ASSSIGNMENT!!

—–>I’VE ATTACHED THE TEMPLATE THE PROFESSOR WANTS US TO USE!

MS Access 2013 Exam Requirements – (Example: Buying a Vehicle)

Grading: 100 Points (Exam 2: MS Access 2013 Exam)

There are 2 Parts for this Exam. Part 1 is 40 points, Part 2 is 45 points, and the 3 website links are 15 points. You should complete MS Access 2013 Tutorial A-D Assignments in your textbook BEFORE you begin this exam. You can choose a different topic for this Exam (i.e. Electronics, Clothes, Shoes, Grocery Store, Airline, Furniture, or just about anything that works for you).

For MS Access 2013 Exam – Part 1 & 2, first you will need tosearch the Internet for information, thencreate a MS Word documentand provide brief responses about setting up database fields and using features in MS Access 2013 for the scenario below.

Note: Type your first and last name at the top of yourMS Word document.Marginsshould be 1”(top, bottom, left, right)and Part 1, Part 2& Web site links should fit on one page only!

Buying a New (or Used) Vehicle (or any other topic that you choose)In the near future you would like to buy a new or used vehicle. Use a search engine (such as Google.com) to search the Internet and find vehicles on at least three different Web sites. Think about how you could use MS Access 2013 to set up vehicle information in your own database and then use various database features.

Note: Copy andpaste the 3 different Web site links(from the address bar where you found your informationto the end of your MS Word document.

Part 1 – List TEN Field names that you could include in your databaseand provide examples of each, based upon the information you found about vehicles on the Internet (Example: Price, Year, Color, MPG, Engine, Transmission, and options such as Power Windows, Sunroof, etc.). Define the appropriate Data Type (Text, Number, Date/Time, etc. – see pg. AC 7 in MS Office Access 2013 Illustrated Introductory textbook)for each fieldSpecify the Field Length(Number of Characters)for each field.

Part 2 – Describe how you could use each of the following MS Access 2013 featureswithyour database: Queriesto create a query, Formsto create a simple form, and Reportsto create a simple report. For Part 2, there should be 3 paragraphswith a minimumof 3 sentences per paragraph about how you will use these features in a MS Access databaseYou must use specific fields and examples that you provided in Part 1 (above). 

Important: You do not need to create a MS Access 2013 database for this Exam!You must use MS Word 2013 for all of your responses to Part 1, Part 2, and Web Sites Links An example is provided – see Sample – MS Access 2013 Exam – Buying a Wedding Cake

—->ATTACHED IS AN EXAMPLE OF WHAT MY PROFESSOR IS REQUESTING!!

Geometry

Please do # 25: Simplify the trigonometric expression.

Also, in #’s 29, 33, and 37 please verify the identities. Thank you!

In Exercises 25-28, simplify the trigonometric expressions.25.cos(3x)bauoh god pele asa zonouput1 18sin(3.x) + sin.x26.sin(4x) + sin(2.x)cos(4x) – cos(2x)27.cosx – cos(3.x)nticies ol mosin(3x) – sin.x99819V28.sin(4x) + sincos(4x) + cosIn Exercises 29-38, verify the identities.s and ,shortCa Non.(bhoose 9%qleased) shed 08129.sinA + sin BcosA + cos B= tanA + B230.sinA – sin BCOSA + cos B= tanA – B231.COSA – cos BA – BCOSA – cos BsinA + sin B= -tan232.sinA – sin B= -tanA + B2sinA + sin BA + BA – BCOSA – cos BA + BEEsinA – sin B= tan2cot234.cosA + cos B= -tantan(A,B35. sinA + sinB = #V[1 – cos(A + B)][1 + cos(A – B)]36. sinAcosB = cosAsinB + sin(A – B)37.coS?A – cos? BCOSA + cosB-2 sinCOSBCOSsinBa Moira

Science

Which volcanic center tend to have the most explosive eruptions?

Which volcanic centers tend to have the most explosive eruptions?Composition RhyoliticDaciticAndesiticBasalticSilica content70%509%Eruption temperature750&quot;-900 C000 -1000 C1100 -1200 CViscosity (water = 0.01 poise)1 x 10′ polje3 x 10′ poise500 poiseGas content5.0%2.0%0.596&quot;Explosiveness&quot;More explosiveLess explosiveLava domesLava flowsVolcanic productsPyroclastic depositsShield volcanoesVolcano typesCinder conesComposite volcanoesDome complexes2010 Pearson Education, Inc.ContinentalHotCratonOcean BasinVolcanic ArcSpotDivergentConvariant4.p myolliesPlate BoundaryFlats Boundarypillas basilliFELSIC Igneous RocksMAFICigneous rocksINTERMEDIATE#.J. various pranksgnoous rocksSpeaites, manzaniesgranodionies dir.Dasalt/gabaremaltingULTRAMAFICSuthforson ZoneIgneous rocks of upp or mande)fractionationresidueplume ofig- paridolila/dusitshol mandeSelect one:a. lava domesb. stratovolcanos xc. fissures at divergent plate tectonic boundariesd. shield volcanose. cinder cones (made of ashfall)f. All of these

Economics

People who quit smoking tend to gain weight, and obesity rates of former smokers are much higher than currentsmokers. In 2001 for example, obesity rates for former smokers are 6 percentage points higher than currentsmokers. Over the past 30 years, adult smoking rates have fallen from 37 to 22 percent while obesity rates haveincreased from 15 to 31 percent. Some have suggested that falling smoking rates may be responsible for higherobesity rates. Given the information above, at most what fraction of the rise in obesity can be explained byfalling smoking rates?

Article Writing

EARLY CHILDHOOD EDUCATION

How does the history of early childhood education relate to currentpractices? 

How can you be an advocate for early childhood education?

Identify advantages and disadvantages of traditional theme planning? 

After reading about the various curriculum models, which model do you feel best fits with you as an educator?

As an early childhood professional describe strategies that you would implement to improve the educational success of children from diverse backgrounds?

Derman-Sparks and Edwards established four goals for anti-bias educations. Do you feel that any of these goals could be difficult to establish in an early childhood classroom?