Questions
Rewrite following Java program using use List and not arrays. public class Shoes { private String...

Rewrite following Java program using use List and not arrays.

public class Shoes {

    private String name;
    private int size;
    private String model;

    public Shoes() {
    }

    public Shoes(String name, int size, String model) {
        this.name = name;
        this.size = size;
        this.model = model;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    @Override
    public String toString() {
        return "name='" + name + '\'' + ", size=" + size + ", model='" + model + '\'';
    }

    public static void main(String[] args) {
        Shoes[] shoes = new Shoes[5];
        shoes[0] = new Shoes("Nike1", 9, "Nike");
        shoes[1] = new Shoes("ASICS2", 12, "ASICS");
        shoes[2] = new Shoes("Adidas8", 11, "Adidas");
        shoes[3] = new Shoes("Saucony7", 6, "Saucony");
        shoes[4] = new Shoes("Brooks5", 8, "Brooks");

        for (int i = 0; i < shoes.length; i++) {
            System.out.println(shoes[i]);
        }
    }
}

In: Computer Science

Discuss the Akali Aggregate Reaction (AAR) attack in terms of: 1. Appearance. 2. cause and significance...

Discuss the Akali Aggregate Reaction (AAR) attack in terms of:
1. Appearance.
2. cause and significance in concrete.

In: Civil Engineering

A vehicle’s VIN is very important for any and all paperwork, such as lease agreements, insurance...

A vehicle’s VIN is very important for any and all paperwork, such as lease agreements, insurance details, servicing schedule etc. However it is easy to mistype a long sequence of characters, and so we’d like to add some validation to ensure that anything entered into this field at least has the right format to be a VIN.

• A VIN is a string of exactly 17 characters

• Each character in a VIN is a digit or an uppercase letter

• A VIN can contain any of the digits 0 to 9

• A VIN can contain any uppercase letter except I, O and Q

• The 9th character of a VIN is either a digit from 0 to 9 or the letter X.

(These are all true facts about a VIN, but in real VINs the 9th character acts a check digit and must satisfy an equation involving the other 16 characters.).

Now, the code needed to be written in SQLITE to check a 17-digit VIN can be very cumbersome. So instead, we’ll use a simplified version of a VIN for this project, which is defined as follows:

• A VIN is a string of exactly 5 characters

• Each character in a VIN is a digit or an uppercase letter

• A VIN can contain any of the digits 0 to 9 6

• A VIN can contain any uppercase letter except I, O and Q

• The 3rd character of a VIN is either a digit from 0 to 9 or the letter X

In: Computer Science

1.  On October 1, Topper Company signs a contract to sell 1,000tie-dyed shirts for $10,000 ($10.00 each)....

1.  On October 1, Topper Company signs a contract to sell 1,000tie-dyed shirts for $10,000 ($10.00 each).

On October 8, 900shirts are delivered and Topper receives $9,000 cash (900 * $10)

  1. Prepare the journal entry Topper Company would record to recognize revenue on October 8:

Debit

Credit

Cash

$9,000

       Unearned Revenue

$9,000

On October 15, Topper modifies the agreement to sell an additional 500 tie-dyed shitsfor $4,000 ($8.00 each * 500 shirts) which is significantly lower than Topper’s stand-alone selling price at that time.

So they still need to deliver 100from the agreement made on October 1 plus another 500for a total of 600tie-dyed flags.  

In: Accounting

DISCUSSION QUESTIONS How do the controls Newell uses fit its strategy??

DISCUSSION QUESTIONS How do the controls Newell uses fit its strategy??

In: Operations Management

Coke can be converted into CO—a fuel gas—in the reaction CO2(g) + C(s) → 2CO(g) A...

Coke can be converted into CO—a fuel gas—in the reaction


CO2(g) + C(s) → 2CO(g)




A coke that contains 84.0% carbon by mass and the balance noncombustible ash is fed to a reactor with a stoichiometric amount of CO2.

The coke is fed at 77.0°F, and the CO2 enters at 400.0°F, heat is transferred to the reactor in the amount of 5559 Btu/lbm coke fed.

The gaseous products and the solid reactor effluent (the ash and unburned carbon) leave the reactor at 1830°F.

The heat capacity of that solid is 0.240 Btu/(lbm °F).

Calculate the percentage conversion of the carbon in the coke. _______%

In: Other

java programming Create a class named Money. It should have member variables for Member Variables Store...

java programming

Create a class named Money. It should have member variables for
Member Variables
Store dollars and cents as members (both should be int). They should be
accessible from only inside the class.
Methods
 Write a default constructor that sets members to 0.
 Write a two-parameter constructor that sets members to the parameter
values.
 Write get/set methods for the member variables.

 Write an override method for toString. The returned string should be
formatted as a normal money string. For example, if dollars is 2 and cents is
5 then it should return $2.05. If dollars is 3 and cents is 50 then it should
return $3.50.
 Write an override method for equals. It should return true if both the
dollars and cents are equal and false otherwise. This means you compare
the dollars in the current to the dollars in the other and you compare the
cents in one to the cents in another.

Class – Main
The main method should be in this class.
 Declare an array of Money in main. The array should have 20 elements.
 Populate the array with data from a file. Use a loop to read data from the
input file. Use the input file data given at the end of this document.
 Write a loop that will print all elements of the array on screen. You should
have read all data from the input file before doing this.
 Write a loop that will add up all the money in the array and store the total
in another Money instance. After the loop print the total money on screen
using the Money instance that has the total. You should use toString to get
the formatted money string. The total money that gets print should not
have a cents value over 99. For example, 7 dollars and 160 cents should be
8 dollars and 60 cents. You should have read all data from the input file
before doing this.
 Add two calls to the Money equals override. One to demonstrate that the
instances are equal and another to demonstrate that they are not equal.

In: Computer Science

CASE ANALYSIS (30 Marks) Mars Inc.: merger of the European food, pet care and confectionery divisions...

CASE ANALYSIS (30 Marks)

Mars Inc.: merger of the European food, pet care and confectionery divisions

Mars Inc. is a diversified multifunctional company whose primary products include foods, petcare, confectionery, electronics and drinks. Owned and controlled by the Mars family, this US giant is one of the world’s biggest private companies, but also one of the most secretive. Mars’ decision in January 2000 to merge its food, pet care and confectionery divisions across Europe – and eventually with headquarters in the UK – has split the marketing industry. The most well-known brands within the three divisions are:

Foods: Uncle Ben’s rice and sauces;
Pet care: Whiskas, Pedigree;
Confectionery: M&Ms, Snickers, Milky Way, Mars Bar.

Mars UK says the decision to pool the businesses was taken to strike at the company’s international competitors in food and confectionery, such as Nestlé and Unilever. The move also coincides with plans to create a single European market and highlights the company’s belief that its consumers’ needs are the same across the continent. However, the combination of food and confectionery with pet care is not clear to all industry observers. One industry analyst made the comment: Generally speaking, Mars is doing the right thing by merging divisions to squeeze profits out of them. Before the advent of the euro it was acceptable to run separate companies in different European countries but not anymore. Another analyst said: ‘I can’t imagine it marketing all three sides of the business together. They’re too different.’ The only visible benefit appears to be an improvement in distribution. Tastes across European markets are very different, whether you’re selling products for animals or people It’s all very well Mars saying it will tackle competitors such as Nestlé and Unilever, but they are only rivals in food and confectionery. If Mars starts laying down too many controls by merging all its businesses – and therefore also its marketing and management strategies – it may streamline communications, but could lose the creativity available in different regions.

Questions:

1. Discuss the two views of organizing Mars’ European activities.

2. Did Mars Inc. do the right thing in your opinion? (20 marks)

In: Operations Management

in C++ In the main function, declare a two-dimensional matrix array 5 by 5, read data...

in C++

In the main function, declare a two-dimensional matrix array 5 by 5, read data from a file named “data.txt”. Suppose the data in the file are integers between 0 and 9. Write your main function to print out the left bottom below the diagonal of the matrix and keep the triangle shape. Note the numbers on the diagonal are not included in the output. An example is given as follows. (25 points)

Suppose the original matrix is

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

The output should be like as follows.

1

1 2

1 2 3

1 2 3 4

#include <iostream>

#include <iomanip>

#include <fstream>

using namespace std;

const int NUM = 5;

int main()

{

      // I - Declaring a five by five array

      /* II - Read data from data.txt and use them to create

             the matrix in the previous step*/

/* III – print out the left bottom below the diagonal of the matrix and keep the triangle shape. Note the numbers on the diagonal are not included in the output.

       read.close();

       return 0;

}

In: Computer Science

discuss the full range of social responses to violence (from retaliation to the development of laws).

discuss the full range of social responses to violence (from retaliation to the development of laws).

In: Psychology

Pixel data is not necessarily arranged into a rectangular grid. E.g., a smiley face is a...

Pixel data is not necessarily arranged into a rectangular grid. E.g., a smiley face is a round image

true or false?

In: Computer Science

legal and cultural considerations for human resources for an international firm in India when hiring top...

legal and cultural considerations for human resources for an international firm in India when hiring top level management using the
Hofstedes Cultural dimensions

In: Operations Management

Identify a warehouse that you encounter in daily life, and describe the products, facilities and the...

Identify a warehouse that you encounter in daily life, and describe the products, facilities and the material handling machines being served/used.

•       Suppose the manager wants you to help improve the warehouse operation efficiency, what do you suggest?
•       If you finally decided to reallocate the warehouse layout, what information do you need the manager to gather?

In: Operations Management

How would you change a typical tariff structure like in the Texas Electrical Provider market to...

How would you change a typical tariff structure like in the Texas Electrical Provider market to take into account social considerations (e.g., favoring low‐income consumers)? (Remember that you are analyzing residential rates, which are generally separate from commercial consumers’ tariffs.) Explain your answer.

In: Economics

In the main function, declare a two-dimensional matrix array 5 by 5, read data from a...

  1. In the main function, declare a two-dimensional matrix array 5 by 5, read data from a file named “data.txt”. Suppose the data in the file are integers between 0 and 9. Write your main function to print out the left bottom below the diagonal of the matrix and keep the triangle shape. Note the numbers on the diagonal are not included in the output. An example is given as follows. (25 points)

Suppose the original matrix is

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

The output should be like as follows.

1

1 2

1 2 3

1 2 3 4

#include <iostream>

#include <iomanip>

#include <fstream>

using namespace std;

const int NUM = 5;

int main()

{

      // I - Declaring a five by five array

      /* II - Read data from data.txt and use them to create

             the matrix in the previous step*/

/* III – print out the left bottom below the diagonal of the matrix and keep the triangle shape. Note the numbers on the diagonal are not included in the output.

       read.close();

       return 0;

In: Computer Science