Ex : Each of the following questions is about event processing.
Mark T if the question is valid, otherwise F.
(1) Subclasses of EventObject on components handle special types of
events such as action, window, component, mouse, and key events (
)
(2) Source objects activate events, event-related objects handle
events, and event-related objects are called risers ( )
(3) For all event types, the riser interface is usually named
XListener for Xevent (except for MouseMotionListener) ( )
(4) e.getSource() may be used to determine if the source object is
a button, check box, or radio button ( )
(5) Since the riser class is not shared by other applications, it
is appropriate to be defined inside the frame as an internal class
( )
(6) Since all methods within the riser interface are abstract and
require implementation of all methods, classes called adapters are
provided for convenience ( )
Please solve the problem. and Please Let me explain the process.
Thank you:)
In: Computer Science
For this assignment, create a complete UML class diagram of this program. You can use Lucidchart or another diagramming tool. If you can’t find a diagramming tool, you can hand draw the diagram but make sure it is legible.
Points to remember:
• Include all classes on your diagram. There are nine of them.
• Include all the properties and methods on your diagram.
• Include the access modifiers on the diagram. + for public, - for private, ~ for internal, # for protected
• Include the proper association lines connecting the classes that “know about” each other.
o Associations
o Dependencies
o Inheritance
o Aggregation
o Composition
• Static classes are designated on the diagram with > above the class name, and abstract classes are designated with > above the class name.
-------------------------------------------------------------------
static class GlobalValues
{
private static int maxStudentId = 100;
public static int NextStudentId
{
get
{
maxStudentId += 1;
return maxStudentId;
}
}
}
class College
{
public string Name { get; set; }
public Dictionary<string, Department> Departments { get; } =
new Dictionary<string, Department> { };
internal College()
{
Departments.Add("ART", new ArtDept() { Name = "Art Dept" });
Departments.Add("MATH", new MathScienceDept() { Name = "Math
/Science Dept" });
}
}
abstract class Department
{
public string Name { get; set; }
public Dictionary<string, Course> CourseList { get; } = new
Dictionary<string, Course> { };
protected abstract void FillCourseList();
// Department constructor
public Department()
{
// When a department is instantiated fill its course list.
FillCourseList();
}
}
class ArtDept : Department
{
protected override void FillCourseList()
{
CourseList.Add("ARTS101", new Course(this, "ARTS101") { Name =
"Introduction to Art" });
CourseList.Add("ARTS214", new Course(this, "ARTS214") { Name =
"Painting 2" });
CourseList.Add("ARTS344", new Course(this, "ARTS344") { Name =
"American Art History" });
}
}
class MathScienceDept : Department
{
protected override void FillCourseList()
{
CourseList.Add("MATH111", new Course(this, "MATH111") { Name =
"College Algebra" });
CourseList.Add("MATH260", new Course(this, "MATH260") { Name =
"Differential Equations" });
CourseList.Add("MATH495", new Course(this, "MATH495") { Name =
"Senior Thesis" });
}
}
class Course
{
public readonly Department Department;
public readonly string Number;
private List<Enrollment> Enrollments { get; } = new
List<Enrollment> { };
public string Name { get; set; }
internal Course(Department department, string number)
{
Department = department;
Number = number;
}
public void Enroll(Student student)
{
Enrollments.Add(new Enrollment(this, student));
Console.WriteLine($"{ student.Name } has been enrolled in \"{ Name
}\".");
}
}
class Student
{
public readonly int Id;
private string name;
public string Name
{
get { return name; }
set
{
name = value;
Console.WriteLine($"{ name } is student ID: { Id }.");
}
}
// New Student constructor with a Student.Id
internal Student(int id)
{
Id = id;
}
// New Student constructor without a Student.Id
internal Student()
{
Id = GlobalValues.NextStudentId;
Console.WriteLine($"A new student has been assigned ID: \"{ Id
}\".");
}
}
class Enrollment
{
public readonly Student Student;
public readonly Course Course;
internal Enrollment(Course course, Student student)
{
Student = student;
Course = course;
}
}
class Program
{
static void Main()
{
College MyCollege = new College();
Student Justin = new Student() { Name = "Justin" };
Student Gloria = new Student() { Name = "Gloria" };
MyCollege.Departments["ART"].CourseList["ARTS344"].Enroll(Justin);
MyCollege.Departments["ART"].CourseList["ARTS214"].Enroll(Gloria);
MyCollege.Departments["MATH"].CourseList["MATH111"].Enroll(Justin);
MyCollege.Departments["MATH"].CourseList["MATH260"].Enroll(Gloria);
Console.WriteLine("Press Enter to quit...");
Console.ReadLine();
}
}
In: Computer Science
How do I write this method correctly? What Ihave is a Java project assignment where I'm supposed to create a Roshambo game. One of the classes that the project is supposed to have is a class called "RoshamboApp that let the user play 1 of 2 AI opponents, a "Bart" class, and a "Lisa" class. The instructions say "Create a class names RoshamboApp that allows player1 to play Bart or Lisa as shown in the console output. Rock should beat scissors, paper should beat rock, and scissors should beat paper." The code for a switch statement that I wrote is below, but the IDE says the way I wrote it is wrong. How can I write it correctly?
The assignment:
Project 10-3: Roshambo
Create an application that uses an enumeration and an abstract class.
Console
Welcome to the game of Roshambo
Enter your name: Joel
Would you like to play Bart or Lisa? (B/L): b
Rock, paper, or scissors? (R/P/S): r
Joel: rock
Bart: rock
Draw!
Play again? (y/n): y
Rock, paper, or scissors? (R/P/S): p
Joel: paper
Bart: rock
Joel wins!
Play again? (y/n): y
Rock, paper, or scissors? (R/P/S): s
Joel: scissors
Bart: rock
Bart wins!
Play again? (y/n): n
Specifications
My code so far for the class in question:
// R = rock
// P = paper
// S = scissors
import java.util.Scanner;
public class RoshamboApp {
String R;
String P;
String S;
String UserChoice;
String AIChoice;
switch(UserChoice)
{
case R:
if (AIChoice == P)
System.out.println("you lose.");
if (AIChoice == S)
System.out.println("you win!");
case P:
if (AIChoice == R)
System.out.println("you win!");
if (AIChoice == S)
System.out.println("you lose.");
case S:
if (AIChoice == R)
System.out.println("you lose.");
if (AIChoice == P)
System.out.println("you
win!");
}
if (UserChoice == AIChoice) System.out.println("it's a draw.");
}
In: Computer Science
You will create this assignment following the Assignment Detail instructions below.
Review the tutorial titled How to Submit the Intellipath Submission Assignment.
Please submit your work to this week’s Intellipath Unit Submission lesson. Click the Upload button within the submission lesson to access the submission area. Click the Select File button to upload your document, and then click "OK" to finish.
Assignment Details
Throughout this class, you have been working with a product of your creation that dealt domestically. This week, you will switch gears and address a real company that does global business.
Note: Please refrain from using assignments from other classes that you have taken.
The Analysis
Select a global company of your choice in the service industry. Using your selected global company as the subject matter, research the principles of marketing that impact this organization, and prepare an APA paper with the following:
Describe the main line of business of the company.
Name 4 of the countries in which the company operates.
Explain in detail the implementation of the 4 P marketing mix concept by the company, including the following:
Competition
Target market
Product strategy
Distribution strategy
Communication strategy
Pricing strategy
Describe any differences observed in the implementation of this concept from one country to another.
This assignment will be assessed using additional criteria provided here.
Your report must include a reference list. All research should be cited in the body of the paper. In-text citations and corresponding references should be included in your paper. For more information on APA style, please visit the APA lab. The paper should be written in third person, which means that pronouns like “I,” “we,” and “you” are not appropriate. The use of direct quotes is strongly discouraged.
Your assignment should contain a cover page, an abstract page, and a reference page in addition to the body. The body of the paper should be 3–4 pages in length, starting with a brief 1-paragraph introduction and ending with a short conclusion. The entire submission will be 6–8 pages in length.
Please submit your assignment as a Word document in APA format using the attached template.
Submitting your assignment in APA format means that you will need a minimum of the following:
Title page: Remember to include the running head and the title in all capital letters.
Abstract: This should be a summary of your paper, not an introduction. Begin writing in third person voice.
Body: The body of your paper begins on the page following the title page and abstract page, and it must be double-spaced (be careful not to triple- or quadruple-space between paragraphs). The typeface should be 12-point Times New Roman or 12-point Courier in regular black type. Do not use color, bold type, or italics, except as required for APA headings and references. The deliverable length of the body of your paper for this assignment is 3–4 pages. In-body academic citations to support your decisions and analysis are required. A variety of academic sources is encouraged.
Reference page: References that align with your in-text academic sources are listed on the final page of your paper. The references must be in APA format, using appropriate spacing, hang indention, italics, and upper and lower case as appropriate for the type of resource used. Remember, the reference page is not a bibliography, but it is a further listing of the abbreviated in-text citations that are used in the paper. Every referenced item must have a corresponding in-text citation.
In: Operations Management
foreach(int i ______ intArr)
In: Computer Science
In: Nursing
PumpkinPlus is a profit-maximizing firm that produces a carving tool using labor and materials according to a production function for which both labor and materials are normal inputs. PumpkinPlus faces a downward-sloping demand curve for carving tools. Say the wage rate rises. What changes do you predict in the use of labor, the use of materials, the number of tools produced, the price per carving tool, and the profit earned by the firm in the long run? Explain your reasoning and mention why you may not be able to predict the direction of certain changes. Provide a sketch of an isoquant/isocost line diagram and a diagram showing demand, marginal revenue, average total cost, and marginal cost to illustrate the old and new amounts of each variable listed.
In: Economics
Psychologists like B. F. Skinner have studied how we can use
operant conditioning to change the behavior of people and animals.
Drawing on your personal experience, choose a person or animal
whose behavior you want to change. (You may select your own
behavior for this question if you wish.) How could you use operant
conditioning to change the behavior of this person or animal?
In a multi-paragraph essay, describe your plan to change this
behavior. Be sure to mention what type of reinforcer and
reinforcement schedule you would use and explain why you made those
particular choices. Include information from class materials,
readings, and research on operant conditioning to support your
discussion.
In: Psychology
Please answer questions in a 2 paragraphs and/or bullet point
example of public agencies you can mention (FDA,CDC,NATIONAL INSTITUTES OF HEALTH,DEPARTMENT OF HEALTH AND HUMAN SERVICES )
What is the importance of public health agencies ? What protocols must be followed to ensure safety of community ? must be a paragraph
how does the community benefit from these public health agencies ?
how does the politicians participate in these public health agencies ? / what is the politicians role in funding the public agencies
What are some common infection/ diseases that are lead to when protocol is not met by public agencies / what can happen if protocols is not met by these public agencies
( please use scientific statistics when answering the last question and attach your source )
In: Nursing
QUESTION 3
(A) In dairy production, what do you understand by the term ‘lactation cycle’? (1 Mark)
(B) Mention the four (04) phases of the lactation cycle and highlight the specific time periods when these phases occur in dairy cows (4 Marks)
(C) Explain how milk production varies in the different phases of the lactation cycle (4 Marks)
(D) Relate the milk production to the feed intake and body weight of the dairy cow during the four phases of the lactation cycle (8 Marks)
(E) Briefly explain the term ‘negative energy balance’ and when does this normally happen in dairy cows (2 Marks)
(F) What is the recommended time of servicing the dairy cow during her lactation cycle?
In: Biology