Let’s say that we work at some new video store and need to design some classes that will help us organize our database of movies. You are to write the following classes:
Write a class called Video that will have the following properties:
Declare the instance fields title (String), length (int), avail (Boolean)
Declare two constructors
One default
One with title and length as parameters
Write a method that will output the fields of the objects by overriding the print method
Write an accessor method for availability:
public boolean getAvail()
Write a mutator method for availability!
public void setAvail(boolean b)
2. Write another class called Movie that will inherit the properties of the Video class but will also define two new fields: the movie rating and the name of the director. Give the movie class it’s own print method and constructors for default and with title, length, rating, and director as paramenters.
3. In the Main.java class create the following objects:
Video – Name: CPC Sports, 90 mins Available: No
Video - Name: CPC Through the Years, 2 hours, Available: Yes
Movie- Name: Mission Impossible 4, 2 hours 30 mins, Available: No, Director: Brad Bird, Rating: 4 stars
Movie- Name: Star Wars, 2 hours, Available: Yes: Director: George Lucas, Rating 5 stars
Can you change the availability of a movie using the mutator method from Video?
Given Code:
Main.java
class Main {
public static void main(String[] args) {
}
}
Video.java
class Video{
}
Movie.java
class Movie extends Video{
}
In: Computer Science
Photosynthesis Homework Name:_______________________
DIRECTIONS: Use Chapter 10 to help answer the questions and fill in the table below. Bring to class completed at the beginning of lecture.
Molecule |
Reaction Involved? |
Purpose |
Photon |
||
H2O |
||
CO2 |
||
ATP |
||
NADPH |
In: Biology
<!doctype html>
<html lang="en">
<head>
<title>Programming 1</title>
<meta charset="utf-8"/>
</head>
<body>
<script type="text/javascript">
function findAnswer() {
var a = new Date(2020, 12, 29);
// HINT: Be careful with getMonth()
var d = a.getFullYear() + a.getMonth();
var sum = d % 5;
document.getElementById("ans").innerHTML = sum.toString();
}
</script>
<form action="#" method="post" name="form1" id="form1" class="form" >
<input type="button" name="Submit" id="submit" value="Submit" onclick="findAnswer();"/>
</form>
<p id ="ans"></p>
</body>
</html>
none
Will the code from above print anything, if so, what printed ? If not, say NONE.
In: Computer Science
What is the universal audience and what is its pupose and characteristics
In: Psychology
Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console), the three integers represent left bound, right bound and arbitrary digit ‘m’, where left bound is less than right bound. Program should print all nice numbers in the given range that doesn’t contain digit 'm'. The number is nice if its every digit is larger than the sum of digits which are on the right side of that digit. For example 741 is a nice number since 4> 1, and 7> 4+1. with digit m=2 Write a complete program in Java that Call only One method (niceNumbers method) that will print all nice numbers excluding a given digit ‘m’ that also entered by user ? Input Sample : Enter Left bound: 740 Enter Right bound:850 Enter digit to exclude it:2 Output sample: Nice Numbers in Range Left=740, Right=850 with exclude digit m= 2 are: 740 741 750 751 760 810 830 831 840 841 843 850 Your method prototype is like this: public static void niceNumbers(int left, int right, int dight) { ...
In: Computer Science
Do women have a right to an abortion?
(Please write a 300 word response)
In: Psychology
In a Compton scattering experiment, an x-ray photon scatters through an angle of 16.6
In: Physics
Respond in your journal entry in 700- to 1050- words to the following prompts:
Determine how AFI strategy framework acts as an integrative facilitator for strategic management planning. Identify the guiding principles used for preparing effective statements that describe the mission, vision, and the core values of an organization. Review the mission statement in Chapter 1 of Strategic Management: Concepts (p. 13), and determine whether the Caterpillar Inc. mission statement conforms to the description in the text. State the reasons the mission statement conforms or does not conform. Research public information, such as news releases, financial reports, and marketing analyses. Based on your research evaluate the alignment between what Caterpillar is currently doing and their mission, vision, or values statement.?
In: Operations Management
Write a simple Python program that will generate two random between 1 and 6 ( 1 and 6 are included). If the sum of the number is grader or equal to 10 programs will display “ YOU WON!!!”. if the sum is less than 10, it will display “YOU LOST”. After this massage program will ask users a question: “if you want to play again enter Y. if you want to exit enter ‘N’) If the user enters Y they will continue to play and if they enter N the program terminates.
In: Computer Science
Owen Mills Limited began its operations on Trumpet Land, a
beautiful island in
the Caribbean with a very diverse population in terms of age,
gender, ethnicity,
religion, disability, sexual orientation, education, and origin. In
1970, at the age of
twenty-eight (28), Owen Mills a progressive thinking young man
decided to start
his own business. His father had worked as a Manager at a large
department store
in the city of Trumpet Land for as long as Owen can remember, and
his father
would share his daily experiences. The idea of operating his own
business was
always at the forefront of Owen’s mind. After gaining four (4)
Advanced Level
subjects (Mathematics, Geography, English Literature and Spanish),
Owen got a
job at a large Credit Union where he moved up the ranks from a
Customer Service
Clerk to Supervisory level within four (4) years and then onto
being a Credit
Officer.
During his time at the Credit Union, Owen attended a number of
short
management courses. This built his confidence that someday soon he
will achieve
his dream of being a big business man. At age twenty-eight (28)
Owen thought
that he had saved sufficient money along with his wife who worked
at another
Credit Union, so that they could purchase a small one-story
building in the heart of
the city. The building was at the corner of French Street and John
Street, the main
street in the city. The building was refurbished and painted in
bright red, and blue
to suit the liking of Mr. Mills. He thought to himself “No one
could miss this
building” and he also thought of a tag line. Business started in
February 1970.
2
From the inception of the business to date, the tagline emblazoned
at the front of
the store “We have all that you want!’ has remained.
The Early Years
Owen Mills Limited operated as a sole proprietorship for many years
selling
almost every item that a household could want, staying true to his
tagline. The
business began with five (5) employees: his wife serving as the
cashier, two store
clerks, one driver and a cleaner. The store was well sectioned with
a variety of
items as shown in Table #1 below.
As a forward-thinking entrepreneur, Mr. Owen Mills is pondering
going into
manufacturing something, but he has to think carefully about the
product to
be manufactured. Therefore, he needs to understand what the Value
Chain
is about as well as the types of strategies that he could utilize
to gain a
competitive advantage.
1.What information would you provide to Mr. Mills and his family
regarding
the Value Chain as they think seriously about going into the
manufacturing
sector?
In: Operations Management
Assignment is to think about the term conflict and what it means, then determine 10-20 different words or phrases that helps to define conflict; and draft an analysis of the definition and words/phrases based on the five types of conflict: relationship; data; interest, structural, value and pseudo.
In: Psychology
Steve Murningham, manager of an electronics division, was considering an offer by Pat Sellers, manager of a sister division. Pat's division was operating below capacity and had just been given an opportunity to produce 8,000 units of one of its products for a customer in a market not normally served. The opportunity involves a product that uses an electrical component produced by Steve's division. Each unit that Pat's division produces requires two of the components. However, the price that the customer is willing to pay is well below the price that is usually charged; to make a reasonable profit on the order, Pat needs a price concession from Steve's division. Pat had offered to pay full manufacturing cost for the parts. So Steve would know that everything was above board, Pat supplied the following unit cost and price information concerning the special order, excluding the cost of the electrical component:
Selling price $32
Less costs:
Direct materials 17
Direct labour 7
Variable overhead 2
Fixed overhead 3
Operating profit $3
The normal selling price of the electrical component is $2.30 per unit. Its full manufacturing cost is $1.85 ($1.05 variable and $0.80 fixed). Pat argued that paying $2.30 per component would wipe out the operating profit and result in her division showing a loss. Steve was interested in the offer because his division was also operating below capacity (the order would not use all the excess capacity).
Required:
In: Accounting
<!doctype html>
<html lang="en">
<head>
<title>Programming 1</title>
<meta charset="utf-8"/>
</head>
<body>
<script type="text/javascript">
function findAnswer() {
var a = document.getElementById("box1").value;
var b = document.getElementById("box2").value;
if (typeof(a) == "number" && typeof(b) == "number") {
var c = (a + b) % 5;
document.getElementById("ans").innerHTML = c.toString();
} else {
document.getElementById("ans").innerHTML = "no Good";
}
}
</script>
<form action="#" method="post" name="form1" id="form1" class="form" >
<label>Enter Numbers: </label> <br />
<label> Value 1 : </label><input type="text" name="box1" id="box1" value="10" /><br/>
<label> Value 2 : </label><input type="text" name="box2" id="box2" value="20" /><br/>
<br/> <br />
<input type="button" name="Submit" id="submit" value="Submit" onclick="findAnswer();"/>
</form>
<p id ="ans"></p>
</body>
</html>
Will the code from above print anything, if so what printed ? If not, say NONE.
In: Computer Science
What are all the ways drugs mimic or impact nuerotransmitter action?
In: Psychology
PS.52 The Station, a boutique cookie company, needs to create a production process for its new cinnamon malt ball cookies. To help accomplish this, the company has put together some numbers for production costs (per dozen cookies for the variable costs).
Process Type | Fixed Costs | Labor Costs | Material Costs |
---|---|---|---|
Pre-Bake | $215 | $1.86 | $0.73 |
Easy Bake | $580 | $1.45 | $0.51 |
Speed Bake | $865 | $1.30 | $0.51 |
The Station estimates demand for the semester will be 975 dozen
cinnamon malt ball cookies. Due to the cookies' expected popularity
the selling price will be $5.75 per dozen.
Based on the projected demand (volume) for the semester, which
process type should they select?
Speed Bake |
||
Easy Bake |
||
Pre-Bake |
Under this process type—the one selected in the previous
question—what would be their profits for the semester? (Display
your answer to the nearest whole number).
In: Operations Management