Monthly Archives: September 2017

Writing programs that solve the Programming Projects helps to solidify your understanding



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Programming Projects

Writing programs that solve the Programming Projects helps to solidify your understanding

of the material and demonstrates how the chapter’s concepts are applied.

(As noted in the Introduction, qualified instructors may obtain completed solutions

to the Programming Projects on the publisher’s Web site.)

 

3.1 In the bubbleSort.java program (Listing 3.1) and the BubbleSort Workshop

applet, the in index always goes from left to right, finding the largest item and

carrying it toward out on the right. Modify the bubbleSort() method so that it’s

bidirectional. This means the in index will first carry the largest item from left

to right as before, but when it reaches out, it will reverse and carry the smallest

item from right to left. You’ll need two outer indexes, one on the right (the old

out) and another on the left.

 

3.2 Add a method called median() to the ArrayIns class in the insertSort.java

program (Listing 3.3). This method should return the median value in the

array. (Recall that in a group of numbers half are larger than the median and

half are smaller.) Do it the easy way.

 

3.3 To the insertSort.java program (Listing 3.3), add a method called noDups() that

removes duplicates from a previously sorted array without disrupting the order.

(You can use the insertionSort() method to sort the data, or you can simply

use main() to insert the data in sorted order.) One can imagine schemes in

which all the items from the place where a duplicate was discovered to the end

of the array would be shifted down one space every time a duplicate was

discovered, but this would lead to slow O(N2) time, at least when there were a

lot of duplicates. In your algorithm, make sure no item is moved more than

once, no matter how many duplicates there are. This will give you an algorithm

with O(N) time.

 

3.4 Another simple sort is the odd-even sort. The idea is to repeatedly make two

passes through the array. On the first pass you look at all the pairs of items,

a[j] and a[j+1], where j is odd (j = 1, 3, 5, …). If their key values are out of

order, you swap them. On the second pass you do the same for all the even

values (j = 2, 4, 6, …). You do these two passes repeatedly until the array is

sorted. Replace the bubbleSort() method in bubbleSort.java (Listing 3.1) with

an oddEvenSort() method. Make sure it works for varying amounts of data.

You’ll need to figure out how many times to do the two passes.

The odd-even sort is actually useful in a multiprocessing environment, where a

separate processor can operate on each odd pair simultaneously and then on

each even pair. Because the odd pairs are independent of each other, each pair

can be checked—and swapped, if necessary—by a different processor. This

makes for a very fast sort.

112 CHAPTER 3 Simple Sorting

 

3.5 Modify the insertionSort() method in insertSort.java (Listing 3.3) so it counts

the number of copies and the number of comparisons it makes during a sort

and displays the totals. To count comparisons, you’ll need to break up the

double condition in the inner while loop. Use this program to measure the

number of copies and comparisons for different amounts of inversely sorted

data. Do the results verify O(N2) efficiency? Do the same for almost-sorted data

(only a few items out of place). What can you deduce about the efficiency of

this algorithm for almost-sorted data?

 

3.6 Here’s an interesting way to remove duplicates from an array. The insertion sort

uses a loop-within-a-loop algorithm that compares every item in the array with

every other item. If you want to remove duplicates, this is one way to start.

(See also Exercise 2.6 in Chapter 2.) Modify the insertionSort() method in the

insertSort.java program so that it removes duplicates as it sorts. Here’s one

approach: When a duplicate is found, write over one of the duplicated items

with a key value less than any normally used (such as –1, if all the normal keys

are positive). Then the normal insertion sort algorithm, treating this new key

like any other item, will put it at index 0. From now on the algorithm can

ignore this item. The next duplicate will go at index 1, and so on. When the

sort is finished, all the removed dups (now represented by –1 values) will be

found at the beginning of the array. The array can then be resized and shifted

down so it starts at 0.

 

And here are the respective instruction given by teacher to follow

 

3_1

Develop bidirectional method bidiBubbleSort( ).

The main( ) may look like:

public static void main(String[] args)

{

int maxSize = 100;           // array size

ArrayBub arr;                // reference to array

arr = new ArrayBub(maxSize); // create the array

 

arr.insert(7);               // insert 7 items

arr.insert(6);

arr.insert(5);

arr.insert(4);

arr.insert(3);

arr.insert(2);

arr.insert(1);

 

arr.display();               // display items

 

arr.bidiBubbleSort();        // bidirectional bubble sort

 

arr.display();               // display them again

}  // end main()

 

The output may look like:

7 6 5 4 3 2 1

1 2 3 4 5 6 7

 

 

3_2

It is a simple project and will give you minimum points.

Define the median( ) method.

The main( ) may look like:

public static void main(String[] args)

{

int maxSize = 100;            // array size

ArrayIns arr;                 // reference to array

arr = new ArrayIns(maxSize);  // create the array

 

arr.insert(77);               // insert 10 items

arr.insert(99);

arr.insert(44);

arr.insert(55);

arr.insert(22);

arr.insert(88);

arr.insert(11);

arr.insert(00);

arr.insert(66);

arr.insert(33);               // even number of elems

 

arr.display();                // display items

long med = arr.median();      // find median

System.out.println(“Median is ” + med);  // show median

 

arr.insert(109);              // odd number of elems

 

med = arr.median();           // find median

arr.display();                // display items

System.out.println(“Median is ” + med);  // show median

}  // end main()

 

The output may look like:

77 99 44 55 22 88 11 0 66 33

Median is 55

0 11 22 33 44 55 66 77 88 99 109

Median is 55

 

 

3_3

Define the method noDups( ).

The main( ) may look like:

public static void main(String[] args)

{

int maxSize = 100;            // array size

ArrayIns arr;                 // reference to array

arr = new ArrayIns(maxSize);  // create the array

 

 

arr.insert(12);

arr.insert(12);

arr.insert(13);

arr.insert(13);

arr.insert(15);

arr.insert(27);

arr.insert(27);

arr.insert(27);

arr.insert(27);

arr.insert(32);

arr.insert(33);

arr.insert(34);

arr.insert(44);

arr.insert(44);

arr.insert(55);

arr.insert(56);

arr.insert(57);

arr.insert(57);

 

arr.display();                // display array

 

arr.noDups();                 // remove duplicates

 

arr.display();                // display it again

}  // end main()

 

 

The output may look like:

12 12 13 13 15 27 27 27 27 32 33 34 44 44 55 56 57 57

12 13 15 27 32 33 34 44 55 56 57

 

3_4

Develop the method oddEvenSort( ).  In the textbook in the description there is a small mistake (slip pen): even indexes are 2, 4, … .  But should be 0, 2, 4, … .

You may use an outer loop. The limit on the outer loop is related to nElems like this:

nElems 1 2 3 4 5 6

k <      1 1 2 2 3 3

The main( ) method may look like:

public static void main(String[] args)

{

int maxSize = 14;             // array size

ArrayIns arr;                 // reference to array

arr = new ArrayIns(maxSize);  // create the array

 

arr.insert(81);

arr.insert(77);

arr.insert(99);

arr.insert(44);

arr.insert(55);

arr.insert(22);

arr.insert(88);

arr.insert(77);

arr.insert(11);

arr.insert(00);

arr.insert(44);

arr.insert(66);

arr.insert(33);

arr.insert(33);

 

arr.display();                // display items

 

arr.oddEvenSort();            // sort them

 

arr.display();                // display them again

}  // end main()

 

The output may look like:

81 77 99 44 55 22 88 77 11 0 44 66 33 33

0 11 22 33 33 44 44 55 66 77 77 81 88 99

 

See additionally the output that traces odd-even code:

81 77 99 44 55 22 88 77 11 0 44 66 33 -1 -2

 

81 77 99 44 55 22 88 11 77 0 44 33 66 -2 -1

77 81 44 99 22 55 11 88 0 77 33 44 -2 66 -1

77 44 81 22 99 11 55 0 88 33 77 -2 44 -1 66

44 77 22 81 11 99 0 55 33 88 -2 77 -1 44 66

44 22 77 11 81 0 99 33 55 -2 88 -1 77 44 66

22 44 11 77 0 81 33 99 -2 55 -1 88 44 77 66

22 11 44 0 77 33 81 -2 99 -1 55 44 88 66 77

11 22 0 44 33 77 -2 81 -1 99 44 55 66 88 77

11 0 22 33 44 -2 77 -1 81 44 99 55 66 77 88

0 11 22 33 -2 44 -1 77 44 81 55 99 66 77 88

0 11 22 -2 33 -1 44 44 77 55 81 66 99 77 88

0 11 -2 22 -1 33 44 44 55 77 66 81 77 99 88

0 -2 11 -1 22 33 44 44 55 66 77 77 81 88 99

-2 0 -1 11 22 33 44 44 55 66 77 77 81 88 99

-2 -1 0 11 22 33 44 44 55 66 77 77 81 88 99

-2 -1 0 11 22 33 44 44 55 66 77 77 81 88 99

You can write a similar code, but it is optional.

 

 

3_5

Ad a method

public void put(int index, long value)  // insert at index

and modify the method insertionSort( ).

 

The main( ) method may look like:

public static void main(String[] args)

{

int maxSize = 25;             // array size

ArrayIns arr;                 // reference to array

arr = new ArrayIns(maxSize);  // create the array

 

for(int j=0; j<maxSize; j++)  // insert in-order items

arr.insert(j);

 

arr.put(10, 7);               // out of order item at 10

arr.put(20, 13);              // out of order item at 20

 

arr.display();                // display items

 

arr.insertionSort();          // insertion-sort them

 

arr.display();

}  // end main()

 

The output may look like:

0 1 2 3 4 5 6 7 8 9 7 11 12 13 14 15 16 17 18 19 13 21 22 23 24

Copies=58, comparisons=34

0 1 2 3 4 5 6 7 7 8 9 11 12 13 13 14 15 16 17 18 19 21 22 23 24

 

 

3_6

Modify insertion sort to remove duplicates.

/* Just after the normal comparison (top of while loop), the two

elements are also compared to see if they’re duplicates. If so,

the one in ‘temp’ is replaced by a sentinal, which has a value

lower than any key. On exit from the while loop, this

sentinal will end up inserted at the lowest index, following

the shifts of all the larger items to the right.

 

Now we no longer end the while loop when ‘in’ gets to 1, but when

it gets to ‘start’, which records the number of duplicates found

so far. At the buttom of the for loop, we check if there is

a sentinal at the lowest index (‘start’). If so, we bump

up ‘start’, which makes the sentinal invisible to the rest

of the algorithm. This will happen whenever there’s a duplicate,

so the array will shrink from the bottom up. The smaller the

array, the faster the sorting algorithm runs.

 

At the end of this method we shift the cells left (writing over

the sentinals), so the array again starts at 0. (One can imagine

situations where this shift would not be necessary).

*/

The main( ) may look like:

public static void main(String[] args)

{

int maxSize = 100;            // array size

ArrayIns arr;                 // reference to array

arr = new ArrayIns(maxSize);  // create the array

 

arr.insert(77);

arr.insert(77);

arr.insert(99);

arr.insert(44);

arr.insert(55);

arr.insert(22);

arr.insert(88);

arr.insert(77);

arr.insert(11);

arr.insert(00);

arr.insert(44);

arr.insert(66);

arr.insert(33);

arr.insert(33);

 

arr.display();                // display array

 

arr.insertionSort();          // sort and de-dup it

 

arr.display();                // display it again

}  // end main()

 

The output may look like:

77 77 99 44 55 22 88 77 11 0 44 66 33 33

0 11 22 33 44 55



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Review the Financial Times video and use the resource-based view of international business strategy (IBS) by addressing the following:



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Submit your 3-2 Case Study here.

Review the Financial Times video and use the resource-based view of international business strategy (IBS) by addressing the following:

  1. Evaluate Sony’s five-year performance versus major global rivals, both financial and strategic positioning.
  2. Characterize the salient aspects of the global audio and video equipment and consumer electronics industry value chain.
  3. Conduct a VRIO analysis of Sony’s major resources and competencies within its value chain.
  4. Do any competencies reach the “core” or “distinctive” level over rivals? How do these relate to their chosen generic strategy and value chain activities?
  5. Summarize Sony’s strengths and weaknesses. What are the strategic implications for Sony’s future IBS?

Suggested Resources:
Sony 2012 Annual Report and company website

https://www.sony.net/SonyInfo/IR/library/ar/2012/

https://www.sony.com/

Library Databases:

  • Company information: OneSource and Value Line
  • Industry information: Net Advantage and MarketLine

Commentary may include Reuters, WSJ, Financial Times, or industry-related publications

For additional details, please refer to the Case Study Guidelines and Rubric document in the Assignment Guidelines and Rubrics section of the course.



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

I’m taking Introduction to Game programming course this semester, and I ave discussion questions every week. I attached the discussion questions for this week and I need it before 10:00 pm today. It’s only 5 questions and I must get A+ in this course.



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

I’m taking Introduction to Game programming course this semester, and I ave discussion questions every week. I attached the discussion questions for this week and I need it before 10:00 pm today. It’s only 5 questions and I must get A+ in this course.



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Write a Java™ application using NetBeans™ Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Assignment 2

Write a Java™ application using NetBeans™ Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:

A salesperson will earn a fixed salary of $85,000.00.

· A salesperson will also receive a commission as a sales incentive. Commission is a percentage of the salesperson’s annual sales. The current commission is 10% of total sales.

· The total annual compensation is the fixed salary plus the commission earned.

The Java™ application should meet these technical requirements:

· The application should have at least one class, in addition to the application’s controlling class (a controlling class is where the main function resides).

· There should be proper documentation in the source code. Including a header block comment section (Programmer Name, Date, University Info, Code Narrative/Description, Special Inputs or Libraries, Outputs Descriptions, and any special notes to users and programmers.

· The application should ask the user to enter annual sales, and it should display the total annual compensation.

Deliverables (Two (2) Files):

Files# 1. Take a screen shot that shows the program’s successful compilation and execution. Submit the screen shot in a MS Word document.

File #2. Submit a Compress/ZIP file that contains your Java NetBeans Assignment Project.

Note: No points will be awarded for submitting just a java file program alone. It is required to submit a Compress/ZIP file that contains your Java NetBeans Assignment Project.  Submit the Assignment NetBeans Project in a Zip file.

Important: All individual and Learning Team programming assignments are Java programming assignments. In this class you are required to use NetBeans as your Java Integrated Development Environment (https://netbeans.org). You can only submit for grading NetBeans Projects in a Zip files.

The easiest way to do that is by doing the following: Once you are ready to submit your assignment, on the NetBeans, main menu, go to File –> Export Project –> Zip option. Pay close attention to where are you saving the Zip file. It is important to identify the location of the Zip file. You are required to submit the Compressed/Zipped NetBeans Java Project file. I will decompress/Unzip your project in a sandbox folder, open NetBeans, and then your project. After I open your project I will start the grading process.

——————————————————————

Assignment 3

Modify the Assignment 2 Java™ application using Java™ NetBeans™ IDE to meet these additional and changed business requirements:

https://www.coursehero.com/tutors-problems/Java-Programming/9538295-I-am-struggling-with-Java-Programming-but-here-is-what-I-am-suppose-to/

  • The company has recently changed its total annual      compensation policy to improve sales.
  • A salesperson will continue to earn a fixed salary      of $85,000.00.      The current sales target for every salesperson is $150,000.00.
  • The sales incentive will only start when 80% of the sales      target is met. The current commission is 15% of total      sales.
  • If a salesperson exceeds the sales target, the      commission will increase based on an Incentive factor. The Incentive      factor is 2.0%
  • The application should ask the user to enter annual      sales, and it should display the total annual compensation.
  • The application should also display a table of      potential total annual compensation that the salesperson could have      earned, in $20,000.00 increments      above the salesperson’s annual sales, until it reaches 50% above      the salesperson’s annual sales.
  • Sample Table: Assuming an Initial total annual sales amount of $500,000.00, the       table would look like this:

 

Total Sales

Total   Compensation

 

500,000

<<Program   calculated value>>

 

520,000

<<Program   calculated value>>

 

540,000

<<Program   calculated value>>

 

560,000

<<Program   calculated value>>

 

580,000

<<Program   calculated value>>

 

600,000

<<Program   calculated value>>

 

620,000

<<Program   calculated value>>

 

640,000

<<Program   calculated value>>

 

660,000

<<Program   calculated value>>

 

……..

<<Program   calculated value>>

 

750,000

<<Program   calculated value>>

The Java™ application should also meet these technical requirements:

  • The application should have at least one class, in      addition to the application’s controlling class.
  • The source code must demonstrate the use of      conditional and looping structures.
  • There should be proper documentation in the source      code. Including a header block comment section (Programmer Name, Date,      University Info, Code Narrative/Description, Special Inputs or Libraries,      Outputs Descriptions, and any special notes to users and programmers.

Deliverables (Two (2) Files):

Files# 1. Take a screen shot that shows the program’s successful compilation and execution. Submit the screen shot in a MS Word document.

File #2. Submit a Compress/ZIP file that contains your Java NetBeans Assignment Project.

Note: No points will be awarded for submitting just a java file program alone. It is required to submit a Compress/ZIP file that contains your Java NetBeans Assignment Project.  Submit the Assignment NetBeans Project in a Zip file.

Important: All individual and Learning Team programming assignments are Java programming assignments. In this class you are required to use NetBeans as your Java Integrated Development Environment (https://netbeans.org). You can only submit for grading NetBeans Projects in a Zip files.

The easiest way to do that is by doing the following: Once you are ready to submit your assignment, on the NetBeans, main menu, go to File –> Export Project –> Zip option. Pay close attention to where are you saving the Zip file. It is important to identify the location of the Zip file. You are required to submit the Compressed/Zipped NetBeans Java Project file. I will decompress/Unzip your project in a sandbox folder, open NetBeans, and then your

——————————————————————

Assignment 4

Modify the Assignment 3 Java application using NetBeans IDE to meet these additional and changed business requirements:

  • The application will now compare the total annual      compensation of at least two salespersons.
  • It will calculate the additional amount of sales      that each salesperson must achieve to match or exceed the higher of the      two earners.
  • The application should ask for the name of each      salesperson being compared.

The Java application should also meet these technical requirements:

  • The application should have at least one class, in      addition to the application’s controlling class.
  • The source code must demonstrate the use of Array or      ArrayList.
  • There should be proper documentation in the source      code.

Submit your Java application file



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

1. A little boy was drowning in the family swimming pool. Emergency medical technicians were called and came to the home. The floor was wet from the water on the child’s body and from those that brought him to the house. It was too late for the child; though he lived, he lived in a vegetative state and had to be fed through a feeding tube. He cannot communicate in any way. A policewoman called to the scene slipped on the floor and injured her knee. She sued the parents of the child for personal injuries. Why do you think a lawyer would take this case, and why would the policewoman file the suit? Does the policewoman have a case? Justify your answer. (1 page) 2. Occasionally, when examining marketplace considerations, an organization might establish strategies for consolidation. Name the 4 ways to accomplish this objective, and give an example. (1 page) 3. Please do not use Wikipedia for this assignment. Search the Internet for at least 3 good definitions of the Good Samaritan Law. Compare the definitions with the text material from the book (The Legal Environment Today: Business In Its Ethical, Regulatory, E-Commerce, and Global Setting, 7th Edition. Which do you think is the better explanation? Provide your source or sources for your response. (1 page) Justify your response using knowledge acquired from research and textbook. Cite the sources using APA format. (2 pages)



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus. NOTE: All submission posting times are based on midnight Central Time.

You just opened a flower shop and are trying to understand pricing issues. You were told that elasticities are very important in determining prices and what products to supply, so you decide to investigate this concept.

You call your friend, an economics professor, and ask, “What is the price elasticity of demand? What determines it? What is elastic and inelastic demand?”

Need a Professional Writer to Work on this Paper and Give you an A+ 100 % Original Paper? CLICK HERE TO GET THIS PAPER WRITTEN

To really understand it, compute the following price elasticities of demand:

  • The price of a laptop increases by 20% and there is a 40% drop in the quantity demanded.
  • The price of a pack of cigarettes increases by 10% and there is a 5% drop in the quantity demanded.

Of the above examples, which is more elastic, and which is the least elastic? Why? Answer the following questions:

  • Why is elasticity an important concept for a business?
    • Bridge tolls
    • Beachfront properties
    • Gourmet coffee
    • Gasoline
    • Cell phones

 

Now that you are an expert on elasticities, what do you think would be the best time of year to raise prices, and why?

What do you think the elasticities are in the flower business?



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

A little boy was drowning in the family swimming pool. Emergency medical technicians were called and came to the home. ……….



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

1.    A little boy was drowning in the family swimming pool. Emergency medical technicians were called and came to the home. The floor was wet from the water on the child’s body and from those that brought him to the house. It was too late for the child; though he lived, he lived in a vegetative state and had to be fed through a feeding tube. He cannot communicate in any way. A policewoman called to the scene slipped on the floor and injured her knee. She sued the parents of the child for personal injuries.
Why do you think a lawyer would take this case, and why would the policewoman file the suit? Does the policewoman have a case? Justify your answer. (1 page)
2.    Occasionally, when examining marketplace considerations, an organization might establish strategies for consolidation. Name the 4 ways to accomplish this objective, and give an example. (1 page)
3.    Please do not use Wikipedia for this assignment.  Search the Internet for at least 3 good definitions of the Good Samaritan Law. Compare the definitions with the text material from the book (The Legal Environment Today: Business In Its Ethical, Regulatory, E-Commerce, and Global Setting, 7th Edition. Which do you think is the better explanation? Provide your source or sources for your response. (1 page)
Justify your response using knowledge acquired from research and textbook. Cite the sources using APA format. (2 pages)

 

 



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

COGNITIVE SCIENCE: NEURO SCIENCE AND PHILOSOPHY; THINKING AND REASONING



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service

Cognitive science: neuro science and Philosophy; Thinking and reasoning

Please enlighten me on the major factors which affect reasoning performance, also describe and evaluate the main theoretical accounts of human reasoning performance, distinguishing between logical and non logical and illogical processes in reasoning. What is watson’s 4 card selection task and key research findings relating to it



Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service