Consider an online holiday booking system. The users can register to book a holiday package. Which of the following Gang of Four (GoF) patterns is the most appropriate to deal with the creation of a Booking object without exposing its creation logic?
Q: Let Σ = {a,b,c}. Prove that the following languages over alphabet > are not regular.
A:
Q: Formula to calculare the total sales amount of the customer name HORSHOE INCORPORATED. Note: This…
A: function used here is sumif() syntax:- =sumif(range,criteria,sum_range)
Q: Create a html code of below pictures: Mije Marais Lodge Location: Location Here Hostel prices:…
A: Here is the html code of the above problem. See below steps.
Q: poorly designed hash map has resulted in all values being lumped together (that is, they are all in…
A: Introduction: The HashMap data structure is versatile and may be used for various purposes,…
Q: Concurrent Processes / Monitors select which is true options: a CV (condition variable) queues in…
A: The answer of your question is below -
Q: When it comes to protecting a network, what function does a firewall perform above all others? When…
A: Write out the firewall system's objective: Note: Due to the volume of your inquiries, we will only…
Q: how much will it cost to build smart greenhouse based iot and how could it be cheaper speaking about…
A: An embedded system is a combination of software and hardware to perform a dedicated task. The…
Q: 1. Function (subroutine) implementation requires Control instructions. (T/F) 2. We have one register…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: How many different minterms exist for a circuit with 3 inputs (e.g. x, y, z)? 01 02 O O O 16 0 3 04…
A: Solution: Given, How many different minterms exist for a circuit with 3 inputs
Q: Determine if the current state of the system is safe. Explain your reasoning and calculation pat
A: Let us find the need of each process. Need = maximum claim - current allocation. The need matrix…
Q: How can a computer processor save computation cycles while executing many instructions…
A: Almost all applications have a cycle of CPU number crunching and I/O waiting. (Even a basic memory…
Q: How does a cache hierarchy operate, and could you please explain it to me?
A: Given: How would you characterise a real cache hierarchy's structure? The hierarchy of a cache…
Q: When constructing a sufficient Information Strategic plan for your MIS, what are so many cyber…
A: Introduction: While creating a thorough information security plan for your management information…
Q: In Fibonacci's model, rabbits live forever. The following modification of Definition 3.1 accounts fo…
A: G(1) = 1 G(2) = 1 G(3) = 2 G(4 ) = 3 G(5) = 5 G(6) = 8 G(7) = 13 G(8) = 21…
Q: How many inputs does an encoder with 4 outputs have? 03 06 08 16 O 24
A: Dear Student, The answer to your question is given below -
Q: See the code where I am doing worng Correct the code and attached the output also…
A: HTML stands for Hyper Text Markup Language.
Q: How do hash table collisions occur, and what can be done to prevent them? Permit me to illustrate…
A: Handling collisions in a Hash Table: A hash desk is a facts shape this is used to keep keys/fee…
Q: Write a quick message on the BinarySearchTreeList Implementation Analysis?
A: quick message on the BinarySearchTreeList Implementation Analysis
Q: Please use C++ and make sure it's for a sorted array Write a function, removeAll, that takes three…
A: To Write a function removeAll()
Q: Course: Automata and Formal Languages Answer the following questions: 1. Provide the transition…
A: NFA stands for non-deterministic finite automata. It is easy to construct an NFA when compared to…
Q: Select all answers that are an incorrect description of "minterm": a product term with only a single…
A: Introduction Karnaugh map:- The Karnaugh map, sometimes referred to as the K-map, is a technique…
Q: 27. In C programming . make a program that lists 10 numbers from the user into an array, create a…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: Consider an online holiday booking system. The users can register to book a holiday package. Assume…
A: For the given system, it is better to model it as a a. The User and Facility objects should have a…
Q: Let's say your company has entrusted you with the responsibility of evaluating the dangers posed by…
A: Introduction: The level of competition between businesses is rising constantly. Digital assets are a…
Q: Slicers appears as their own box that can be positioned anywhere on the worksheet. O True O False
A: The given question are based true or false condition question.
Q: 1. For the scheduling method "Shortest Job First" (SJF), specify the execution order of the…
A: The algorithm used here for scheduling is SJF. In SJF, process with shortest burst time will be…
Q: how can technological competiveness of smart greenhouse be further achieved for both the consumer…
A: The above question is solved in step 2 :-
Q: 13. In cell A17, use the SUMIF function and structured references to display the total membership in…
A: SUMIF function : One of the math and trig functions, SUMIFS, adds all of the inputs that satisfy…
Q: Using analytical reasoning, describe the scenario shown in Figure 1. Relationship Between RAM…
A: Introduction: The connection that exists between the several variables is referred to as…
Q: Why is it so important to understand the distinction between computer organization and computer…
A: Computer organization and computer architecture:- Computer Organization is the way a computer's…
Q: Give a recurrence relation for W(n),
A: A recurrence is an equation or inequality that describes a function in terms of its values on…
Q: Which development methodology, Waterfall or Agile, is more suited for a university's online course…
A: Dear Student, The answer to your question is given below -
Q: Consider the importance of wireless networks in developing countries. In certain situations,…
A: Introduction: Billions of individuals now have Internet access and can participate in the modern…
Q: How do you verify the presence of an object in a database?
A: Counting the number of database objects that have been produced can be done in a number of different…
Q: With respect to polymorphism, what is "dynamic binding"? Which two things are being bound at…
A: The question is solved in step2
Q: How do I fix this code please read intructions( in java)
A: The java program is given below:
Q: Write a program to calculate item’s sale price 1)Ask user to enter the name of item e.g t-shirt…
A: The above question is solved in step 2 :-
Q: Is it better to use the Waterfall or Agile methodology for creating software that controls medical…
A: Introduction: The need for the software development engineering task is to construct a radiation…
Q: Q1: SELECT DISTINCT COUNT(*) FROM R GROUP BY a; 22: SELECT DISTINCT COUNT (b) FROM R GROUP BY a; Q1…
A: Solution for the above question, INTRODUCTION: DISTINCT keyword in SQL is used to fetch only unique…
Q: give a recurrence
A: Dear Student, The answer to your question is given below -
Q: 10 0 1 0 Derive the Boolean equation(s) from the following truth table (only d, e, f are inputs).…
A: canonical sum of minterm is in which each there is a sum of each minterm
Q: The Windows 10 operating system allows the user to assign a network computer name. Which of the…
A: The above question is solved in step 2 :-
Q: only
A: Chosen-plaintext Attack: This type of attack involves the attacker attempting to encrypt known…
Q: I need help with this assignment
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: Explain why and how inline style sheets take precedence over the document style in an HTML file.
A: Dear Student, The answer to your question is given below -
Q: 2.3 An alias provides a mechanism to rename a column or an expression. Under what conditions should…
A: An alias name is alternate or substitute of a column name in table.
Q: Write a full c++ program to do the following:- 1- define an array (employeeSal) with 5 elements and…
A: Step 1: START. Step 2: Take input of array for salary. Step 3: Make deptIds array with given values.…
Q: # TODO 1.2 feature_names = print(f'The feature names are:\n{feature_names.values}') ([…
A: code : - i created dummy dataframe but you can used your. name is same # import pandas import…
Q: Write a program that will allow two users to play tic-tac-toe. The program should ask for moves…
A: Algorithm for the code:- 1. Start2. Initialize string array board[] with values "1", "2", "3", "4",…
Q: When designing a foolproof MIS information security plan, how many different types of cyber threats…
A: Cyber threats: Cyber threats are malicious code, such as viruses, worms, and trojans, that are…
Step by step
Solved in 2 steps
- We have two classes, Person and Employee. Both have a field, firstName. We have instances of these objectsPerson p and Employee e. Both p and e have the same value for firstName, specifically, p.firstName = “joe”and e.firstName = “joe” Which of the following statements is necessarily true? Group of answer choices 1. p.equals(e) will return true because they contain the same firstName. 2. We don’t know if either class will have an equals method. 3. There is not enough information to tell what p.equals(e) will return. 4. p.equals(e) will return false but p == e will be true.Consider the above scenario, where Billing class has composition relationship with Doctor having private instance variables (docName, docID and docFee) and a public getDocID() method, Patient having private instance variables (pName, pID, pDisease), Medicine having private instance variables (medID, medName, medQty, medPrice), and MedicalTest having private instance variables (testID, testName, testPrice). In addition, each class shall have toString method to display its object state. Also define getDocInfo method in Billing class that shall return the doctor. Implement getPaymentAmount() method in Billing class that shall return the total billing amount that includes doctor fee, medicine cost and medical tests fee. Considering the above scenario, write code that shall perform the following in the driver/test class: Get an amount from user. Traverse the ArrayList<Billing> using enhanced for loop. Print the billing details of those bills having total billing amount greater or…Problem B Now we are going to use the design pattern for collecting objects. We are going to create two classes, a class AmazonOrder that models Amazon orders and a class Item that models items in Amazon orders. An item has a name and a price, and the name is unique. The Item class has a constructor that takes name and price, in that order. The class also has getters and setters for the instance variables. This is the design pattern for managing properties of objects. The setName() method should do nothing if the parameter is the empty string, and the setPrice() method should do nothing if the parameter is not positive. The class also has a toString() method that returns a string representation for the item in the format “Item[Name:iPad,Price:399.99]”. For simplicity, we assume an Amazon order can have at most 5 items, and class AmazonOrder has two instance variables, an array of Item with a length of 5 and an integer numOfItems to keep track of the number of items in the…
- UML diagram analysis: refer to the following UML diagram of the Loan Class. a) How many instance variables does the TV class have? b) How many methods that return a value does the TV class have? c) How many static methods does the TV class have? d) How many constructors does the TV class have? e) How many defaults data fields does the TV class have?Consider an online holiday booking system. The initial design model contains the classes, Booking, Individual_Booking and Group_Booking via inheritance. Which of the following is used to describe the relationship of the three classes in the object-oriented design? a. The has-a relationship b. The get-a relationship c. The set-a relationship d. The is-a relationshipConsider a class BankAccount that has • Two attributes i.e. accountID and balance and• A function named balanceInquiry() to get information about the current amount in the account Derive two classes from the BankAccount class i.e. CurrentAccount and the SavingsAccount. Both classes (CurrentAccount and SavingsAccount) inherit all attributes/behaviors from the BankAccount class. In addition, followings are required to be the part of both classes• Appropriate constructors to initialize data fields of base class• A function named amountWithdrawn(amount) to withdraw certain amount while taken into account the following conditionso While withdrawing from current account, the minimum balance should not decrease Rs. 5000o While withdrawing from savings account, the minimum balance should not decrease Rs. 10,000• amountDeposit(amount) to deposit amount in the accountIn the main() function, create instances of derived classes (i.e. CurrentAccount and SavingsAccount) and invoke their respective…
- Consider an online holiday booking system and the User class in the design. Which of the following special terms describes User objects which have more than one form in the object- oriented design ?O a. AggregationO b. AbstractionOc. PolymorphismO d. CompositionNow we are going to use the design pattern for collecting objects. We are going to create two classes, a class AmazonOrder that models Amazon orders and a class Item that models items in Amazon orders. An item has a name and a price, and the name is unique. The Item class has a constructor that takes name and price, in that order. The class also has getters and setters for the instance variables. This is the design pattern for managing properties of objects. The setName() method should do nothing if the parameter is the empty string, and the setPrice() method should do nothing if the parameter is not positive. The class also has a toString() method that returns a string representation for the item in the format “Item[Name:iPad,Price:399.99]”. For simplicity, we assume an Amazon order can have at most 5 items, and class AmazonOrder has two instance variables, an array of Item with a length of 5 and an integer numOfItems to keep track of the number of items in the…Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called. Constructor methods can be abstract.
- Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called.Create a program that has the following classes: Point - Just like in the lecture, with attributes x and y set to 0 by default. Circle - Contains two attributes, center and radius. center is of type Point defined above (initialize a Point instance for this), while radius is set to 0 by default. The program must have the function point_in_circle(c, p) where c is a Circle and p is a Point. The function returns True if the point is within the circle, and False otherwise. You may use the math module (and nothing else) if necessary. You may also create other functions that can help you code the main function much easier. Example usage # Initialize a circle with center at (0, 0) and radius 1 (unit circle). c = Circle() c.center.x, c.center.y, c.radius = 0, 0, 1 # Initialize a point located at (1, 1) p = Point() p.x, p.y = 1, 1 # This returns False since (1, 1) is outside the circle point_in_circle(c, p)Consider the case of a shop that sells CDs in cash. The CDs are of three types: Movie CDs, Software CDs and Music CDs. For each of the following CD types, the required attributes are:Movie CD: Movie Title, Year of Release, Lead Actor Name, CD price and CD quantitySoftware CD: Software Name, Edition, Year of Release, CD price and CD quantityMusic CD: Album Title, Year of Release, Number of Songs, Format, CD price and CD quantity All objects of the classes cannot change their state once they are instantiated. How will you implement this?