Design a class called Post. This class models a StackOverflow post. It should have properties for title, description and the date/time it was created. We should be able to up-vote or down-vote a post. We should also be able to see the current vote value. In the main method, create a post, up-vote and down-vote it a few times and then display the the current vote value.
Q: Which event delegation model should we employ when creating a graphical user interface (GUI), and…
A: Graphical User Interface: A graphical user interface (GUI) is a sort of user interface that is…
Q: One of the things discussed in this chapter is the sorting of data. Imagine that a large medical…
A: yes The first modification we would need to do is to avoid sorting the patients by their last name.…
Q: What does Interrupt Processing actually entail?
A: An interrupt is an event that breaks the sequence in which the processor executes the instructions.…
Q: tocals to create a virtual gateway to solve the gateway problem. Between R1 and R2 we will create a…
A: Introduction: Below describe the best protocals to create a virtual gateway to solve the gateway…
Q: ARP and DNS both depend on caches; ARP cache entry lifetimes are typically 10 minutes, while DNS…
A:
Q: What separates computer organisation from computer architecture?
A: The needs and design implementation for the various components of a computer are functionally…
Q: Why we like the GUI programming of the event delegation approach. Describe with suitable instances
A: Graphical user interface (GUI) is a computer program that enables a person to communicate with a…
Q: Show that A = {01 did in the class. m> n ≥ 0} is not regular. Hint: apply pumping lemma step by step…
A:
Q: List three distinct applications or systems that employ DWH, along with an explanation of its usage.
A: Data warehouse: It is a method for gathering and overseeing data and that data is utilized for…
Q: What separates a regular subroutine from an interrupt service procedure?
A: Interrupt service procedure An Interrupt service procedure (likewise called an interrupt…
Q: Why do we prefer the event delegation paradigm and its accompanying components when it comes to the…
A: An interface with graphics: A software development tool called a graphical user interface builder…
Q: What do JavaScript and jQuery events mean? Have you ever experienced what you're referring to? What…
A: jQuery: jQuery is a JavaScript framework used in website development that makes it simpler to…
Q: _________ checks whether the CheckBox chk is selected. Question 13 options: chk.getSelected()…
A: CheckBox:- The checkbox is basically a drop-down menu wherein you can choose or select multiple…
Q: d :r
A: 1.Invalid
Q: IPv6 simplifies ARP out of existence by allowing hardware addresses to be part of the IPv6 address.…
A:
Q: Using c++ language, 1. Write the function int isEven (int x); that returns 1 if x is an even number;…
A: Algorithm: Start Declare variables. Read the input any integer Use if else for conditions call the…
Q: Can third-party suppliers of data or security protection damage your system?
A: According to the information given:- We have to define that can third-party suppliers of data or…
Q: Do the two forms of internet vary much from one another?
A: Internet are two types . The age-old dial-up internet connection, which has become almost…
Q: Describe a simple technique for implementing ar replacement algorithm in a four-way set-associa…
A: Introduction: Below Describe a simple technique for implementing an LRU replacement algorithm in a…
Q: To add two nodes node1 and node2 to a pane, use ______. Question 3 options: pane.add(node1,…
A: D. pane.getChildren().addAll(node1, node2);
Q: science of computers Which three scope definition deliverables are the most crucial?
A: Introduction: Deliverables are the most crucial aspects of any organisation or project since they…
Q: What exactly is the SDLC and what are its stages?
A: SDLC: Change in systems A quality system that meets or exceeds customer expectations is delivered…
Q: how do I take two string array inputs from user in java. inputs are:- String[] str1 = {"H", "E",…
A: First create two string array .Create an object of Scanner class. Scanner class helps in taking…
Q: Open a browser on your computer and connect to a website.
A: I am proving you the output below of following commands in the form of screenshot. CMD
Q: Suppose three algorithms A, B, and C, can be implemented to perform a task. The algorithms have the…
A: This is a time complexity problem question. Big-Oh (O) complexity represents the worst-case time…
Q: A set-associative cache consists of 64 lines, or slots, divided into four-line sets. Main memory…
A:
Q: Why are the event delegation model and its elements so intriguing to us? How would you answer if you…
A: The delegation for the event The event delegation model outlines common methods for creating and…
Q: What Do You Mean When You Talk About Operating Systems Partitioning? Give Their Benefits And…
A: Given: Due to this: What Do You Mean When You Talk About Operating Systems Partitioning? Give Their…
Q: A cryptography student has accidentally used the same keystream to encrypt two different messages,…
A: solution: In stream cipher: encryption: C= M XOR K ( where c= cipher m=message k =keystream)…
Q: What is the fundamental difference between a fat-client and a thin-client approach to client-server…
A: The answer of the questions is below:
Q: Give a brief explanation of the two hardware methods for determining priority.
A: Hardware Methods: Daisy Chaining and parallel priority are two alternative techniques for setting…
Q: Write a spark program in intelij IDE to find maximum in a list in a dataframe Pleas code it in…
A: The above question is solved in step 2 :-
Q: In order to move around, the need to use the Changing Staircases. Write a C++ program that asks the…
A: Explanation: This problem is about write program to draw specific pattern. Algorithm: Start declare…
Q: Why does the file stream member function open's second argument exist?
A: answer is
Q: The purpose of this assignment is to learn to develop multi-process programs. You are expected to…
A: Assignment 3 in C: Unix shell with redirects and pipes The purpose of this assignment is to learn to…
Q: Consider a 32-bit microprocessor whose bus cycle is the same duration as that of a 16 bit…
A: The answer is given in the below step
Q: What do you mean by "partitioning" when you refer to operating systems? Make a list of each's…
A: Introduction There are two types of partition in the operating system. 1) Fixing Partitions 2)…
Q: Give the advantages of artificial neural networks
A: The above question is solved in step 2 :-
Q: For the given parent class, write a child class that satisfies the following requirements: • child…
A: parent class- name Berry import java.io.ObjectStreamClass;import java.sql.Connection;import…
Q: 2. Write an iterative algorithm which takes an input a singly linked list and reverse it. Java code…
A: The question is to write JAVA code for the given problem.
Q: For the cache design of the preceding problem, suppose that increasing the line size from one word…
A: the average miss penalty about 2.9 times smaller.
Q: 2. Write an iterative algorithm which takes an input a singly linked list and reverse it. Java code…
A: This program is about creating linked list using iterative algorithm and displaying the desired…
Q: List reasons why your engagement as an information system user is vital during the system…
A: Introduction: To relate the concepts of user engagement and change, provide four reasons why your…
Q: If the four numbers 00, 01, 10, and 11 are coded as shown below, what is the Hamming Distance of…
A:
Q: a. Calculate the effective length of a memory cycle given a hit ratio of 0.9 and a clocking rate of…
A: Preconditions: Clock cycle = (Processor frequency)-1 = (1 / 16.67 ) * 10-6…
Q: Write a function called get_palindromes() that takes a list of words as input. The function should…
A: Here is python code for implementation of the question. See below steps for desired output.
Q: Discuss at least three types of security issues that Amazon might encounter with the technology it…
A: Among the most typical and critical AWS security problems while building or hosting on AWS are the…
Q: What is the private network's url? Should a datagram with an address from a private network ever be…
A: Neither the URL of a private network nor a datagram carrying a personal network address ever appear…
Q: Write a function that inserts the nodes of a binary tree into an ordered linked list. Also write a…
A: This is due to the fact that a templated base class's derived classes inherit from templates. The…
Q: How Can I As A Reader Get My Browser To Recognize My Own Style Sheet?
A: Given: NetscapeUnfortunately, Netscape does not currently provide this functionality (as of version…
Design a class called Post. This class models a StackOverflow post. It should have properties for title, description and the date/time it was created. We should be able to up-vote or down-vote a post. We should also be able to see the current vote value. In the main method, create a post, up-vote and down-vote it a few times and then display the the current vote value.
Step by step
Solved in 2 steps
- You will create a couple of classes that could be used to create a Text Adventure game. The class will be called "Item" and will represent an item in the game that can be carried and used by a player (such as a weapon or a tool). The Item Class The Item class will have only one property: A string description. The Item class will have exactly 3 methods: There will be a default constructor that takes no parameters. This constructor will give a generic, default description of the Item. There will be a constructor that takes a string parameter, and it will initialize the Item's description based on the parameter. There will be a method called "print" that will print the Item's description to standard output. PLEASE MAKE SURE ITS POSSIBLE TO COMPILE WITH THIS CODE. THANKS. #include "Item.h" #include <iostream> #include <string> using namespace std; int main() { Item sword("Sword of Destiny"); Item potion("Healing Potion"); Item key("Key of Wisdom"); string name; cout…Design a class named CustomerRecord that holds a customer number, name, and address. Include separate methods to 'set' the value for each data field using the parameter being passed. Include separate methods to 'get' the value for each data field, i.e. "return" the field's value. Pseudocode:A mountain climbing club maintains a record of the climbs that its members have made. Information about a climb includes the name of the mountain peak and the amount of time it took to reach the top. The information is contained in the ClimbInfo class as declared below. The ClimbingClub class maintains a list of the climbs made by members of the club. The declaration of the ClimbingClub class is shown below. You will write implementations of the addClimb method. import java.util.List; import java.util.ArrayList; class ClimbInfo { private String name; private int time; /** Creates a ClimbInfo object with name peakName and time climbTime. * * @param peakName the name of the mountain peak * @param climbTime the number of minutes taken to complete the climb */ public ClimbInfo(String peakName, int climbTime) { name = peakName; time = climbTime; } /** @return the name of the mountain peak */ public String getName() { return name; } /** @return the number of minutes…
- The zoo will have several animals, and each animal will have a name, age, and species. Moreover, each animal will have a method make_sound(), which should return a string representing the sound it makes. Perform the following steps: Create a Zoo class. This class should be able to store multiple animals. It should have methods to add_animal and remove_animal. Also, add a method get_animals that prints a list of all animals currently in the zoo, including their name, age, and species. Create an Animal parent class. This class should have attributes for name, age, and species. Include a make_sound() method that returns a string representing the sound the animal makes. Create two or more child classes that inherit from Animal (for example, Lion and Elephant - you get to choose the animal types). These child classes should override the make_sound() method to return a sound specific to the animal they represent. Your program should be interactive. It should provide a menu to the user that…Create one more method in the Starship class: encounter(self, enemy_ship) This method takes in self, along with another Starship object. The method should simulate a battle between the two ships. How the method is implemented is almost entirely up to you. You could take in user input for each crew member, or have them each act randomly from the available options, or specify exactly what a given crew member of each type should do. The only requirements are as follows: Each crew member on each ship should get at least one “turn” before the battle is complete. If the crew member is Injured on their turn, they should do nothing. You may assume that each ship will have at least one crew member uninjured when the encounter begins. You shouldn’t make any assumptions about how many crew members there will be on a given ship, where they will start, or about which subclasses will be present - it’s possible that you’ll have test cases including a ship with no captain, or no doctor.…Please written by computer source What will the application do? Display a set of at least 6 cars (at least 3 new and 3 used) along with Add and Quit options Let the user select one of the cars. Ask if they want to buy the car. If they enter yes, remove it from the list. If they want to add another car to the list, get the details, create a new instance of the appropriate class (Car class for new cars, or UsedCar), and add it to your data collection. Keep looping until they choose to quit. Build Specifications If your instructors tells you to work in pairs, stay with your assigned pair for this lab. Create a class named Car to store the data about a car. This class should contain:Data members for car details A string for the make A string for the model An int for the year A decimal for the price A no-arguments constructor that sets data members to default values (blanks or your choice) A constructor with four arguments matching the order above Properties for all data members An…
- Add the following methods to your Boat Race class: Write a method called add_racer which takes in a Boat object and adds it to the end of the racers list. The function does not return anything. Write a method called print_racers which loops through racers and prints the Boat objects. This function takes in no parameters (other than self) and returns nothing. Write a method called count that returns the number of racers. Write a method called race. The race function calls the move function for all of the racers in the BoatRace. Once all the racers have moved, call the print_racers method to display information about the progress of each boat. Then, check if any of the racer’s current_progress is greater than or equal to the race’s distance. If so, then return a list of all of the racers whose current_progress is greater than or equal to distance. If no racer has finished the race then repeat the calls to move and check until at least one racer has finished the race.…Add a list of procedures in your patient class, fill them and print them with the patient data. This is called composition which is a "has a" relationship. A patient has procedures. Write a class named Patient that has attributes for the following data: First name, middle name, and last name Address, city, state, and ZIP code Phone number Name and phone number of emergency contact The Patient class’s _ _init_ _ method should accept an argument for each attribute. The Patient class should also have accessor and mutator methods for each attribute. Next, write a class named Procedure that represents a medical procedure that has been performed on a patient. The Procedure class should have attributes for the following data: Name of the procedure Date of the procedure Name of the practitioner who performed the procedure Charges for the procedure The Procedure class’s _ _init_ _ method should accept an argument for each attribute. The Procedure class should also have accessor and mutator…Create a MagicalPotionShop class, this class needs a field called potions. The potions field should be an ArrayList of the type Potion. Create a MagicalPotion class, this class needs two fields one called name, the other called effect. Both of the fields should be Strings.
- PyCharm Programming! A Game object knows its name and the number of avators is currently has. It is initialized without Avatars objects. It has a method startGame, which initializes an internal empty list of Avator objects. It has a method to add one Avator object at a time to the Game. It also has a method to remove an Avatar object by the Avatar’s name. A Game object also has a method to animate all its current Avatar objects. Furthermore, it has a method to stopGame, which destroys all current Avator objects in its internal list. The Avatar class creates simple human-type Avatars, which have attributes such as name, hair color, height, superpower. An Avatar object can change its hair color and superpower. It also has a method that “animates” the avatar. The animate() method should simply be a print message such as “Hello! I am …! I have…. hair and my super power is….!”, using the Avatar’s object variables. In main program, create 3 different Avatar objects that resemble 3…Eclipise Exercise 1: Write a Java application that simulates a test. The test contains at least five questions about first three lectures of this course. Each question should be a multiple-choice question with 4 options. Design a Test class. Use programmer-defined methods to implement your solution. For example: create a method to simulate the questions – simulateQuestion create a method to check the answer – checkAnswer create a method to display a random message for the user – generateMessage create a method to interact with the user - inputAnswer Display the questions using methods of JOptionPane class. Use a loop to show all the questions. For each question: If the user finds the right answer, display a random congratulatory message (“Excellent!”,”Good!”,”Keep up the good work!”, or “Nice work!”). If the user responds incorrectly, display an appropriate message and the correct answer (“No. Please try again”, “Wrong. Try once more”, “Don't give up!”, “No. Keep…Write an application TestStudent that prompts for and reads a student name. It then creates a Student object. It then prompts for and reads the number of quizzes n that the student has taken. It then prompts for and reads the scores of the student in n quizzes and adds each to the totalScore of the student using addQuiz() method. Finally, the application prints the student object using the toString() method, and it also prints his quiz average. The main method must handle java.util.InputMismatchException, java.lang.IllegalArgumentException and java.lang.Unsupported OperationException.