You are writing a game's weapon-spawning system. The weapon that's spawned is completely randomized. There are a few base types of weapons, but some of these have one or more additional functions. The additional functions can apply to any of the types of weapons. Which design pattern is the most useful here? Question options: Adapter Null Object Decorator Proxy
Q: Which design pattern (singleton, adapter, factory, observer) is NOT applicable here and why? Mention…
A: As per the above toys management application, we cannot use singleton deign pattern. Singleton…
Q: What do you call an instance where an application security test reports an issue which is not…
A: Application security testing (AST) is the process of finding security flaws and vulnerabilities in…
Q: company is implementing tokenization as an alternative to protecting data without encryption. During…
A: The answer given as below:·
Q: What is the purpose of the “private” part of an object interface? Why can’t it be hidden completely?
A: What is the purpose of the “private” part of an object interface? Why can’t it be hidden completely?
Q: It is a template for creating an object? Select one: O a. Encapsulation O b. Method Ос. Class O d.…
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: What is the purpose of an object interface's "private" section? Why can't it be entirely hidden?
A: Introduction: The C++ compiler must be able to build code that uses a class based just on the class…
Q: Which procedure among the following should be used to implement a ‘Has a’ or a ‘Kind of’…
A: Question. Which procedure among the following should be used to implement a ‘Has a’ or a ‘Kind of’…
Q: How can you protect a metacharacter (such as the $ character) from shellinterpretation?a. Precede it…
A: Shell metacharacters: Shell metacharacters are used to ignore some parts of the command while being…
Q: To restrict access to parts of a Web application, we use access filters. What does not describe…
A: You can create custom filter attributes by implementing an appropriate filter interface for which…
Q: is an API that can access any kind of data stored in RDBMS. a. JSF b. Servlet c. JDBC d. JSP 2. What…
A: The answers of the following questions are as follows:
Q: (b) Analyse the following Java code segment and answer the questions that follow: 1| Canvas…
A: The question is about analysing the given JAVA code segment.
Q: QUESTION 9 What are the different visibility modifiers? Differentiate between them. QUESTION 10…
A: 9. The visibility modifiers are listed below: Public Protected Private Default or internal
Q: Question No:1 Suppose, there are two activities namely "Sender" and "Receiver". The first activity…
A: The above code makes use of the Scanner class which is used to take user inputs. It is defined in…
Q: Create two instances of Computer? using the failable initializer. One instance should use values…
A: Create two instances of computer?Using the feasible initializer.One instances should use values that…
Q: The StateManager Interface is a generic interface which has two methods changeState (boolean :…
A: import java.util.*;import java.lang.*;import java.io.*; class ItemTester{ public static void…
Q: Part I Create an interface for a Store application. Provide at least 3 function. Part II Create a…
A: i have provided interface implements logic in step-2.
Q: program that asks trivia questions and pulls data from an access database. I'm getting an error that…
A: It is defined as programs can be asked from control statements, array, string, oops etc. Java basic…
Q: You will be writing a scheduling application allowing a convention center to schedule events. This…
A: Here I written Python Code as per your problem. I hope you like it.
Q: If you want to pass an object of type "Student" from one activity to another, then the class…
A: If you want to pass an object of type "Student" from one activity to another then the class"Student"…
Q: How do we create a new environment using baseenv() as the parent? A) e = new.env(parent =…
A: Given: How do we create a new environment using baseenv() as the parent? A) e = new.env(parent =…
Q: 2. Read all eight messages into Mailbox object from the file of "messages1.txt". The values for each…
A: Hi... Please check below java code. Mailbox.java import java.util.List; public class Mailbox {…
Q: Create a distributed application using RMI for buying tickets at the Opera. The client application…
A: The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed…
Q: 2. You are creating a game that has the character go through a maze. Some walls are visible, but…
A: Design patterns are the industry best coding practises that are taken into use by good developers…
Q: Create an interface relational interface relational { void greaterThan(); void lessThan(); void…
A: In Java, an interface is a template for a class. It has abstract methods and static constants. In…
Q: Which represents the data of application? Model View Controller Superclass
A: Actually, database is a used to stores the data.
Q: what is access modifier? Access modifier is good? why? We have Public, Default, Private, and…
A: Disclaimer: “Since you have posted a question with multiple sub-parts, we will solve the first three…
Q: 1. Create (the package) as (P1) and another as (P2). 2. Create an Interface (named Human) inside…
A: A class is the basic building block of object oriented modelling. It contains data and operations on…
Q: Write about Autoincrement/Autodecrement Mode.???? With neat diagram
A: The Answer is in Below Steps
Q: hich statement of the following is the most appropriate? Group of answer choices You don’t have to…
A: STL contains many container classes which can be used for performing any function or algorithm.
Q: We can get a pop up GUI version of any cmdlet that will allow us to run the cmdlet or copy the…
A: Answer: The correct answer to the given question is option ("Get-Alias").
Q: User: Make a class called User. Create two attributes called first name and last_name, and then…
A: User.java class User{ private String first_name; private String last_name; //constructor for…
Q: C#. So I did a project where I have two classes database.cs & info.cs. I created .dll file about…
A: So I did a project where I have two classes database.cs & info.cs. I created .dll file about…
Q: What is the usage of the spawned object?
A: Answer: The word spawn clearly defines that users want the data in a more specific manner. There is…
Q: hich of the following statement is not true? An anonymous inner class is compiled into a class…
A: A) True : An anonymous inner class is compiled by a class named OuterClassName$n. For example, if…
Q: The application should be extendable so that a new search criterion can be added, perhaps as a new…
A: INTRODUCTION: Create an application that allows you to search through a database table of employee…
Q: User: Make a class called User. Create two attributes called first_name and last_name, and then…
A: Step 1:- Note:-I am writing the program in the python language because there is no programming…
Q: Write a class called TV with attributes: channel, volumeLevel, on_Off_state. The default values…
A: Exception is thrown when user tries to set the values that are out of range
Q: What happens if you change the definition of a class by, say, adding an extra field, and then try to…
A: Serialzed object changes are Delete field Class move up or down in hierarchy Non static or non…
Q: creating more than one Scanner instance that read the input from the console potentially causes…
A: Scanner: It is used to read the input from the console. Syntax: Scanner input=new…
Q: the purpose of including the model primary key as a hidden input in a Razor Form
A: The purpose of including the model primary key as a hidden input in a Razor Form
Q: You have some questionable legacy code (that doesn't use interfaces) that you want to enhance, but…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: he contact service shall be able to add contacts with a unique ID. The contact service shall be able…
A: You can try the code in the second step. please feel free to post your full code to help us better…
Q: Create an application named RecoveringDemo that declares objects of three types: Patient,…
A: Answer : Here the programming language is not mentioned so i have given a answer in C# language the…
Q: Which of the following is the correct way to define an interface?
A: The correct options with explanations are below. The incorrect options are also explained that why…
Q: You are given a super class called People and a sub-class (derived class) called Engineer. The sub-…
A: Answer : Subclass is a derived class which is comes from another class. here engineer is the base…
Q: A constructor that takes an existing user as well as a new userID. * It should create a new user…
A: As, you have not provided the implementation information of the twitteruser class. i just did the…
Q: 4. A typical _________ program creates some remote objects, makes references to these objects…
A: Question 4. A typical _________ program creates some remote objects, makes references to these…
6.
You are writing a game's weapon-spawning system. The weapon that's spawned is completely randomized. There are a few base types of weapons, but some of these have one or more additional functions. The additional functions can apply to any of the types of weapons. Which design pattern is the most useful here?
Question options:
|
Adapter |
|
Null Object |
|
Decorator |
|
Proxy |
Step by step
Solved in 2 steps
- Scenario You work for a small company that creates text-based games. You have been asked to pitch an idea to your team for a text-based adventure game with a theme and environment of your choice. Your game must include different rooms, items, and a villain. The basic gameplay will require the player to move between different rooms to gather all of the items. A player wins the game by collecting all the items before encountering the villain. The player will have two options for commands in the game: moving to a different room, and getting an item from the room they are in. Movement between rooms happens in four simple directions: North, South, East, and West. You must include the designs for your game as a part of your idea pitch. Specifically, you have been asked to provide a map that displays the different rooms and items. You have also been asked to use pseudocode or flowcharts to design code for moving between rooms and getting items. If your pitch gets approved, these designs will…Scenario You work for a small company that creates text-based games. You have been asked to pitch an idea to your team for a text-based adventure game with a theme and environment of your choice. Your game must include different rooms, items, and a villain. The basic gameplay will require the player to move between different rooms to gather all of the items. A player wins the game by collecting all the items before encountering the villain. The player will have two options for commands in the game: moving to a different room, and getting an item from the room they are in. Movement between rooms happens in four simple directions: North, South, East, and West. You must include the designs for your game as a part of your idea pitch. Specifically, you have been asked to provide a map that displays the different rooms and items. You have also been asked to use pseudocode or flowcharts to design code for moving between rooms and getting items. If your pitch gets approved, these designs will…Scenario You work for a small company that creates text-based games. You have been asked to pitch an idea to your team for a text-based adventure game with a theme and environment of your choice. Your game must include different rooms, items, and a villain. The basic gameplay will require the player to move between different rooms to gather all of the items. A player wins the game by collecting all the items before encountering the villain. The player will have two options for commands in the game: moving to a different room, and getting an item from the room they are in. Movement between rooms happens in four simple directions: North, South, East, and West. Directions In this project, you will break the problem down into a set of requirements for your game program. Then you will design your game by creating a storyboard and pseudocode or flowcharts. Remember, in Project One, you are only designing the game. You will actually develop the code for your game in Project Two. Review the…
- Gradient FillIn this labwork are asked to write a GUI application again using AWT. This is a fairly easy labworkthat is more about getting used to synchronized online learning. You are expected to:• Draw two rectangles.• Both of them should be filled using GradientPaint() function of AWT. (Check out itsfunction definition that is listed below.)• The first gradient should be parallel to the diagonal of the first rectangle. The colorgradient should not be repeated (acyclic).• The second gradient should be horizontal. The color gradient should be repeated forthis one (cyclic).• You are free to choose the colors but other than that your output should be similar tothe example screenshot given below.Description: The game is a single player scenario, in which the player’s army needs to defeat the enemy’s (AI’s) army. There are 4 possible troops for an army: Archers, Spearman, Cavaliers, Footman. Each troop has some attributes and some actions. And to avoid excessive programming and calculation, we want to treat these troops as squadrons. The player always starts with 10 squadrons of their choices: they can choose any combinations of the 4 possible troop types. Each squadron should have 100 members of that troop type. Each turn, the player is allowed to choose one of their squadrons and perform an action which is allowed by that troop type. Player and the AI take turns to make actions. The game continues until either the player or the AI has no troops left. Troop Types and Descriptions: Archers: should be able to attack from range with no casualties, meaning the attack action should not cause any damage to themselves. They should be pretty fragile to anything themselves. They…Super Ghost Project Rule changes: The premise of the game remains the same, there are two players adding words to a growing word fragment. Each player will take turns attempting to add letters to a growing word fragment. The letter you select should attempt to force your opponent to spell a word or create a word fragment that has no possibility of creating a word. Unlike the prior ghost competition, when it is your turn you are allowed to add a letter to either the front or back of the word fragment. Winning Criteria: If your opponent spells a word that is at least 6 characters long if your opponent creates a word fragment that has no possibility of creating a word if your opponent takes longer than 60 seconds to select a word. Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should…
- Design your own interface The grade to be given on each criteria must not be greater than 95 and must not be lower than 65. (Display an alert message if the input is incorrect). Apply the given percentage for each criteria in computing the total grade. Activities - 35% Exam - 40% Recitation - 25% DISPLAY REMARKS based on the criteria below: 74 Below - FAILED 75 to 79 - POOR 80 to 85 - FAIR 86 to 90 - GOOD 91 to 95 - EXCELLENTAssignment using Methods For this exercise, you need to complete all the questions in a single project. You will invoke the methods from your main. Questions 1-6 is due at the end of your next class. Write a method with the following specifications:name: DisplayMenuarguments: nonereturn value: nonetasks: display the following menu choice on the screenCalculation Menu3) Calculate Sum 4) Calculate Sum of Squares5) Calculate Sum of Cubes0) To ExitEnter the number that corresponds to your choice: You may beautify the output to your own likings. You don’t have to implement the functionalities of the various menu choices at this stageCall this method from your main. Modify your main so that the above method is call repeatedly. The program will terminate when the user enters 0. Any other choice should produce an error message. Because you will not be doing any arithmetic you may accept the user response either as an int, or a char or a string. Write a method with the following…Hangman gameWrite a terminal based on the game of Hangman. In a hangman game, the player is given a wordthat they need to guess, with each letter of the word represented by an underscore/blank. Theplayer tries to guess a letter of the word by entering it into the terminal. If the letter is correct, theblank corresponding to that letter is filled in. If the letter is incorrect, a part of a stick figure isdrawn. The player has a limited number of incorrect guesses before the stick figure is fully drawnand the game is lost. The player wins the game if they guess all the letters of the word before thestick figure is fully drawn.The program should have an array of possible words to choose from. A different word should berandomly chosen from the array every time we run the program.Others: Do not use GOTO statements
- Hangman gameWrite a terminal based on the game of Hangman. In a hangman game, the player is given a wordthat they need to guess, with each letter of the word represented by an underscore/blank. Theplayer tries to guess a letter of the word by entering it into the terminal. If the letter is correct, theblank corresponding to that letter is filled in. If the letter is incorrect, a part of a stick figure isdrawn. The player has a limited number of incorrect guesses before the stick figure is fully drawnand the game is lost. The player wins the game if they guess all the letters of the word before thestick figure is fully drawn.The program should have an array of possible words to choose from. A different word should berandomly chosen from the array every time we run the program.Do not use GOTO statementsClass Design Within the backend server, we’ll have multiple classes to organize our code. All the class descriptions are listed below. FoodWastageRecord NOTE: You need to design this class. It represents each food wastage entry recorded by the user through the form on the webpage (frontend). If you notice the form on the webpage, you’ll see that each FoodWastageRecord will have the following as the data members aka member variables. Date (as string) Meal (as string) Food name (as string) Quantity in ounces (as double) Wastage reason (as string) Disposal mechanism (as string) Cost (as double) Each member variable comes with its accessor/mutator functions. FoodWastageReport NOTE: You need to design this class. It represents the report generated on the basis of the records entered by the user. This class will be constructed with all the records entered by the user as a parameter. It will then apply the logic to go over all the records and compute the following: Names of most…Dice Rolling Class In this problem, you will need to create a program that simulates rolling dice. To start this project, you will first need to define the properties and behaviors of a single die that can be reused multiple times in your future code. This will be done by creating a Dice class. Create a Dice class that contains the following members: Two private integer variables to store the minimum and maximum roll possible. Two constructors that initialize the data members that store the min/max possible values of rolls. a constructor with default min/max values. a constructor that takes 2 input arguments corresponding to the min and max roll values Create a roll() function that returns a random number that is uniformly distributed between the minimum and maximum possible roll values. Create a small test program that asks the user to give a minValue and maxValue for a die, construct a single object of the Dice class with the constructor that initializes the min and max…