Create a Python program that:
The program should:
Save the program as a Python module, and submit the program through this assignment.
In: Computer Science
1. Look at the following partial class definition, and then respond to the questions that follow it: public class Book { private String title; private String author; private String publisher; private int copiesSold; } a. Write a constructor for this class. The constructor should accept an argument for each of the fields. b. Write accessor and mutator methods for each of the fields. c. Draw a UML diagram for the class, including the methods you have written. 2. Consider the following class declaration: public class Addition { public int num1, num2; public String s1; public int add(int num1, int num2) { int sum = num1 +num2; return sum; } } a. Write a no argument constructor for the class. It should assign the value 0 to num1 and num2 fields. b. Write an overload constructor for this class that will concatenate the string values passed as arguments to it.
In: Computer Science
While death maybe an unfortunate and inevitable occurrence in human life, the death of government policies was originally thought of as so or near impossible. Many researchers considered that termination can cause difficulties when trying to identify causal and predictable relationships. Possibly even more troublesome is the misunderstanding of what constitutes termination (Kinney, N, 2013).
However, the government of Malaysia have terminated several policies such as Teaching Science and Mathematics in English (PPSMI), Goods and Services Taxes (GST) and bend bridge project.
Based on the examples given above, do you agree with the author? Justify your answer
If you were hired as a public official and you were given instructions to terminate a program or a policy,
i) how would you proceed?
ii) would you apply the ‘big bang’ or the long whimper approach? Justify your answer?
In: Operations Management
Q 1 Large European conglomerates have been selling subsidiaries in recent years. Name one reason that could explain this trend:
Q2 Why is it difficult to draw conclusions on the diversification discount? Name one reason
In: Finance
In C# Create a windows application which accepts the month
number and displays the month name in a label.
Use a nested if... else statement to determine the month
name.
For months not in the range 1-12 display the message "Not a valid
month"
In: Computer Science
An instructor in a large lecture class found, at the end of the semester, that the total point distribution in his class was approximately Normal, with a mean of 530 and a standard deviation of 80. About what percent scored between 490 and 590?
30.9% 46.5% 77.3%
Paleontology students went on a dig for fossils. The following data set contains the number of fossils found by a sample of 12 students.
10,13,9,50,16,13,22,18,20,14,19,12
Median: _______ fossils
In my friend's coin purse, I found 12 pennies. The ages, in years, of the pennies obtained by subtracting the year stamped on the coin from 2016 follow.
22, 14, 8, 1, 9, 0, 31, 2, 13, 3, 11, 10
Rounding to the nearest tenth, the mean and median of this distribution (in years) are:
11.3 and 9.5.
10.3 and 9.5.
9.5 and 10.3.
10.3 and 10.5.
Consumer Reports is doing an article comparing refrigerators in their next issue. Some of the characteristics to be included in the report are the brand name and model; whether it has a top, bottom, or side‑by‑side freezer; the estimated energy consumption per year (kilowatts); whether or not it is Energy Star compliant; the width, depth, and height in inches; and both the freezer and refrigerator net capacity in cubic feet.
Is "refrigerator capacity" a categorical variable, a quantitative variable, or an individual?
categorical variable
individual
None of the given options are correct.
quantitative variable
In: Statistics and Probability
Your client, Wholesaler, sold a large number of freezers to Retailer on credit. This occurred on May 1, 2017. Wholesaler had purchased these freezers from Manufacturer on March 1, 2017. Manufacturer had purchased the components from Supplier on November 1, 2016. Assume that each transaction is a credit sale and that every creditor timely filed a UCC-1 such that they are secured parties.
A. Draw the picture of each and every transaction and explain each of these transactions under Article 9 of the UCC.
B. Now assume that Cindy bought a freezer for her house from Retailer on May 15, 2017. Retailer filed the UCC-1 on July 1, 2017. Cindy sold that freezer to her friend, Cool Girl, on January 5, 2018. Cool Girl was paying Retailer for the debt in Cindy’s name until Cool Girl lost her job on March 1, 2018. Cool Girl has not made a payment since but he has not told Cindy about this either. What are Retailer’s rights as to this freezer? Would that change if Retailer did not file a UCC-1? Why or why not?
C. Assume that Supplier never filed when it sold to Manufacturer. Manufacturer files for Chapter 7 bankruptcy on January 5, 2017 and Manufacturer had not paid Supplier at that time. What are Supplier’s rights and remedies? What is the likely result for Supplier in this Chapter 7 bankruptcy since Supplier never filed?
In: Accounting
On 1st January, 2016, a building materials
manufacturing company in Oman purchased a farm land from the
outskirts of Al Dhakliyah region. The cost of the property was OMR
675,000 and the company has made the settlement in full. The
property tax of OMR 36,000 was due from the previous owner of the
farm was paid by the company. All the legal costs relating to the
acquisition of land was OMR 5,400. The old building in the farm
land was demolished at a cost of OMR 54,000 and certain materials
from the old building were recovered by the demolishing persons.
The total value of the salvaged materials from the demolished
buildings was sold out and the value of such salvaged materials
sold was OMR 9,000. The company is proposed to construct a new
building which is going to be used exclusively for its business
purpose. The city municipality has assessed for water connections,
sewage and pavement of street and for this process the total cost
was arrived at OMR 27,000.
a) Calculate the total cost of land to be recorded in
the statement of financial position.
b) Usually, when a land is purchased much type of
other related costs will be included with the purchase price of
land. Mention the name of the costs which are included with the
purchase price. Though it is a Land the life is an unlimited. Hence
land is not considered for depreciation but land and building
absolutely comes under depreciation. If you are agreeing with this
statement, critically analyze with your explanation.
In: Accounting
Graphs with Matplotlib Using the library Matplotlib and the provided data files create the following graphs:
I) Pie chart
Create a pie chart that shows the percentage of employees in each department within a company. The provided file: employee_count_by_department.txt contains the data required in order to generate this pie chart.
II) Line Graph
Create a line graph that shows a company's profit over the past ten years. The provided file: last_ten_year_net_profit.txt contains the data required in order to generate this line graph.
III) Bar Graph
Create a bar graph that shows a company's profit over the past ten years. The provided file: last_ten_year_net_profit.txt contains the data required in order to generate this bar graph. Info: Be sure to label all the axes of each graph with meaningful labels and provide an appropriate title to each of the graphs (mentioned above) being generated. Hint, the names of the files and the headers provided in each of the data files should help
-----------------------
last_ten_year_net_profit.txt
Year ; Profit in $USD
2009 ; $175,000
2010 ; $250,000
2011 ; $525,000
2012 ; $239,000
2013 ; $1,000,000
2014 ; $1,000,500
2015 ; $500,000
2016 ; $740,000
2017 ; $5,625,000
2018 ; $100,000,000
--------------------------
employee_count_by_department.txt
Department Name , Total number of employees
Marketing , 50
Information Technology, 275
Management , 230
Human Resources , 250
Finance , 92
Supply Chain , 73
Manufacturing , 30
In: Computer Science
Assignment 1: JAVA Classes, Objects, and Constructors
The goal of this assignment is to get you familiar with some of the most used JAVA syntax, as well as constructors objects, objects calling other objects, class and instance attributes and methods. You will create a small program consisting of Musician and Song classes, then you will have Musicians perform the Songs.
Included is a file “Assignment1Tester.java”. Once you have done the assignment and followed all instructions, you should be able to compile and run “Assignment1Tester.java”. If “Assignment1Tester.java” compiles and runs, this does not mean your code is correct. But it will make sure that your public facing interface and member variables have the correct specification.
Make certain all member variables and methods are exactly as requested. We may use automated marking, and if we do and you spell a member variable differently, you will not get the mark. That is why we highly encourage you to compile and run “Assignment1Tester.java”. It will check some of these things for you.
Every question is worth 5 marks.
1. Open the file “Musician.java”. There is a “static final” variable defaultNumberOfKnownSongs that has been initialized to 3. In the Musician class, we will add 3 more instance variables. The first should be called name and should be of typeString. The second should be called knownSongs and it should be an array of type Song. The third should be an int callednumKnownSongs.
2. Write a constructor that takes two arguments, “String name” and “int numberOfSongs”. Have this constructor initializeknownSongs to an array of Song with length numberOfSongs, and initialize the name instance variable to the name String that was passed in through the constructor. You should make use of the this keyword. Write a second constructor for theMusician class with a single argument “String name” that initializes knownSongs to an array of Song with lengthdefaultNumberOfKnownSongs. In both constructors initialize numKnownSongs to zero.
3. Write a public String toString(). If the name = “Slash” and he knows 2 songs, it should return a String “My name is Slash and I know 2 songs.”
4. Open the class “Song.java”. Write three constructors. Write a no-argument constructor that assigns the name “unknown” to the song name and “pop” to genre. Write a constructor that takes a String argument and assigns it to name, and assigns “pop” to genre. Write a constructor that takes two String arguments, the first of which is assigned to name and the second is assigned to genre. Make sure that “name” comes first in the constructor method signature.
5. Write a static method “randomSong()” that returns a Song object with a random name from the songNames array and a random genre from the songGenre array.
6. Write a method “public String toString()” that returns a String object describing the Song. That is, if name = “Paradise City” and genre = “hard rock”, then “public String toString()” should return the String “the hard rock song ‘Paradise City’.”
7. Write a method “equals(Song song)” in the Song class that compares the current Song object to the song variable. It returns true if the two songs have the same name and same genre, and false otherwise.
8. In the Musician class, write a method “public boolean learnSong(Song song)”. It should assign the song argument to the first open position in the knownSongs array. If the array is full it should not change the array and return false. If the array is not full, add the song and return true.
9. In the Musician class, write a method “public boolean playSong(Song song)”. If the song argument is equal to a song in the knownSongs array, then the method should output the Musicians name followed by “performs” followed by the song. For instance, if the Musician is named “Slash” and the song was ‘Paradise City’, it would print “Slash performs the hard rock song ‘Paradise City’.” to the screen and return true. Hint: you can make use of the toString() method of the Song class. If the Song argument is not equal to any Song in the knownSongs array, then this method should print “Slash does not know the hard rock song ‘Paradise City’.” and return false.
10. In the Musician class, write a method “public void playAllKnownSongs()”. This method should play every song in the knownSong array with each song formatted as in Question 9.
In: Computer Science