Compulsory Task 2 Create a file named method_override.py and follow the instructions below: ● Take user inputs that ask for the name, age, hair colour, and eye colour of a person. Create an adult class with the following attributes and method: O name, age, eye_colour, and hair_colour O Method called can_drive() that prints the name of the person and that they are old enough to drive. Create a subclass of the adult class named "Child" that has the same attributes, but overrides the can_drive method to print the persons name and that they are too young to drive. Create some logic that determines if the person is 18 or older and create an instance of the Adult class if this is true. Otherwise, create an instance of the Child class. Once the object has been created, call the can_drive () method to print out whether the person is old enough to drive or not. SE L1T29 - Introduction to OOP II - Inheritance.pdf 1 of 2
Q: on returns a list item? each Osum()
A: The Python list function that returns a list item is called itemgetter(). It is a part of the…
Q: Accessor and mutator methods
A: In object-oriented programming, accessor and mutator methods are used to access and modify the…
Q: QUESTION 21 Which of the following statements about the given diagram are true? A B The chains of…
A: Symbols of UML class diagram ,
Q: By randomly selecting a vertex, identifying its neighbours, and then determining the vertex with the…
A: Luby's algorithm is a randomized algorithm used to compute a maximal independent set (MIS) in a…
Q: Determine the most important categories of NoSQL (not-a-sql) data management systems and describe…
A: NoSQL is an umbrella term to describe any alternative system to traditional SQL databases.NoSQL…
Q: What details does a process using one host use to recognise a process using another host?
A: At the point when a process on one host needs to communicate with a process on another host, it…
Q: Summarize a DBA's responsibilities for configuration control?
A: A Database Administrator (DBA) is responsible for managing the data stored in an organization's…
Q: What are the advantages and disadvantages of using a hosted software programme to "test drive" a…
A: This question comes from Software Engineering which is a paper of Computer Science. Let's discuss it…
Q: Python programme flowchart: Chemically, 2KMnO4 + 8H2SO4 +10FeSO4 → K2SO4 + 5Fe2(SO4)3 + 2MnSO4 +…
A: Here is the pseudocode for the Python program: Take the input mass value for KMnO4 in grams…
Q: How should DFDs be symmetrical?
A: The answer is given below step.
Q: Fibonacci sequence locations 1 and 2 are 0 and 1. Each element is a sum of two preceding components.…
A: The Fibonacci sequence is a mathematical series in which each term is the sum of the two preceding…
Q: It's important to know how DFDs should be balanced.
A: Hello student Greetings DFDs, or Data Flow Diagrams, are used to visualize the flow of data…
Q: The given inputs consist of two nodes (s, t) and a directed graph G = (V, E). In addition, each edge…
A: The problem can be solved using a modified depth-first search (DFS) algorithm. The idea is to…
Q: Why not use a theory-based approach to teaching people how to use the new computer system instead of…
A: The implementation of a new computer system in an organization is a common occurrence in the current…
Q: In what ways may the Cyber Kill Chain Model help you?
A: The Cyber Kill Chain Model is a popular framework used in cybersecurity to understand, prevent, and…
Q: What precisely is a business impact analysis (often abbreviated as BIA)? What are some of the roles…
A: A Business Impact Analysis (BIA) is a process used by organizations to identify and evaluate the…
Q: What kind of ethical and security issues may a company face when using BI tools and data?
A: Hello student Greetings Business Intelligence (BI) tools and data can provide companies with…
Q: What are the differences between the unsigned binary formats, excluding underscores?
A: Unsigned numbers can only contain the magnitude of the number since they lack a sign. As a result,…
Q: Which of the following facets of the programme are frequently tested using black box testing? Please…
A: Black box testing is a type of software testing that focuses on testing the functionality of a…
Q: What sorts of services are offered at the network layer?
A: Network layer The network layer is the third layer of the OSI model for computer networks. Its…
Q: You may select the waterfall approach if you had to choose between it and a more relevant one. Which…
A: In general, the waterfall approach is a linear and sequential software development process that…
Q: Four people start on one side to cross a rickety bridge. 17 minutes to cross them all. Nighttime,…
A: The rickety bridge problem is a classic puzzle that challenges individuals to find the minimum time…
Q: Give three examples of technology solutions that may be used to improve transport layer security.
A: Transport Layer Protection (TLS) is a cryptological protocol proposed to transmit fast over a…
Q: 1. The number of iterations it takes gauss-seidel to converge: a. Initial guess: [0, 0, 0] b.…
A: Below is the python code to solve the given system of equations using Gauss-Seidel method and print…
Q: Smart Detection can identify a performance issue that slows page loading in one web browser. If…
A: The World Wide Web (WWW) and other internet-based services may be accessed and material can be shown…
Q: The company will no longer support your current LIS system, so you will need to select a new one.…
A: Selecting a new LIS system for your lab can be a intimidating task. There are more than a few…
Q: Explain requirement engineering's Elicitation, Specification, and Validation steps. Discuss…
A: Requirement engineering is the process of defining, documenting and maintaining requirements in the…
Q: What are the top three essential responsibilities of a database administrator? In regards to the…
A: A Database Administrator (DBA) is a professional responsible for managing, maintaining, and securing…
Q: Assume we are using regularized logistic regression for binary classification. Assume you have…
A: Correct answer : (C) Try using a smaller set of features & (D) Get more training examples
Q: I need openMP C++ code for this task. Write a programme that prints your laptop's cores and…
A: What is C++ Programming: C++ programming is a popular and powerful programming language that allows…
Q: Explain and describe the three distinct data source categories?
A: Data can come in a variety of formats in the field of computer science, each with its own set of…
Q: Students need to be given a reasonable acceptable use guideline. Restrict things like social media,…
A: Internet access policies are documents employers use to communicate using technology in the…
Q: How does a process running on one host recognise a process running on another?
A: In computing, a process refers to a program that is currently executing or running on a computer…
Q: Kindly create a diagram or flowchart that illustrates the different components and their…
A: flowchart: It is a visual representation of a process, algorithm, or workflow. It uses…
Q: Explain some of the challenges that you face while putting business intelligence into action.
A: We face many challenges while putting business intelligence into action which are explained below.
Q: Which of the DBLC's six stages is the data dictionary most relevant to?
A: The DBLC (Database Life Cycle) is a methodology used for designing, implementing, and maintaining a…
Q: Hospital system (E)ER diagram: Patients are identified by ss#, name, insurance, admittance…
A: Relational Database Management System or RDBMS is a software system that manages relational…
Q: Hard computation. How hard is nl-n(n-1)(n-2)...(2)(1)? Is there a polynomial-time n! algorithm?…
A: In computational complexity theory, the term "hard computation" refers to problems that are…
Q: Is there a site quite similar to this one that you would visit? Why?
A: Prior to searching for a website that is identical to this one, it is crucial to pinpoint the…
Q: Why Should a Company Keep Their Records Private? Imagine the dangers if there weren't any safeguards…
A: There are several reasons why a company should keep their records private: Protecting sensitive…
Q: Please enumerate the most important tasks that a DBA is responsible for in terms of configuration…
A: In this question we need to explain the important tasks of Database Administrator (DBA) in terms of…
Q: Explain why linear search is preferable than binary search and provide two examples.
A: For large datasets, linear search methods are often slower than a binary search algorithm since its…
Q: Draw the heap from the array. Consider this heap a queue. 2) Dequeue each item from this queue until…
A: I apologize, but as an AI language model, I don't have access to any array or heap that you are…
Q: If wireless networks degrade faster than conventional ones, why is that?
A: Wireless networks are a type of computer network that use wireless data connections to connect…
Q: Which of the following devices receives data from a source network device and transmits it to a…
A: The given prompt asks about a device that can receive data from a source network device and transmit…
Q: if P = NP, then show that SAT P.
A: If P = NP, then every problem in NP can be solved by a polynomial-time algorithm. The Boolean…
Q: JavaScript events? Onclick script.
A: In JavaScript, events refer to actions or occurrences that happen in the browser or on a web page.…
Q: Which factor should a business use when making reservations to provide the most secure baseline and…
A: As more businesses shift their operations to the cloud, virtualization technology is becoming…
Q: Apart from the underscores, what distinguishes each of the unsigned binary formats?
A: Unsigned binary formats are second-hand to represent non-negative integers in digital system. There…
Q: Provide an explanation of the three categories of data and their definitions.
A: Data is any information that is handled by a computer system. As a general rule, data can be sorted…
Step by step
Solved in 3 steps with 4 images
- Task 9 Write the Student class so that the given code provides the expected output. 1. Create Student class 2. Create 3 class variable 3. Create 1 class method for object creation 4. Create 1 class method for printing [You are not allowed to change the code below] # Write your code here Оutput: Total Student(s): 0 BRAC University Student(s): 0 Other Institution Student(s): 0 Student.printDetails() print('## Name: Mikasa Ackerman mikasa = Student('Mikasa Ackerman', "CSE") mikasa.individualDetail() print('- Student.printDetails() %3D Department: CSE Institution: BRAC University Total Student(s): 1 BRAC University Student(s): 1 Other Institution Student(s): 0 print('= =') ========= harry = Student.createStudent('Harry Potter', "Defence Against Dark Name: Harry Potter Arts", "Hogwarts School") harry.individualDetail() print('- Student.printDetails() Department: Defence Against Dark Arts Institution: Hogwarts School --') Total Student(s): 2 BRAC University Student(s): 1 Other Institution…Compulsory Task 2 Create a file named method_override.py and follow the instructions below: ● Take user inputs that ask for the name, age, hair colour, and eye colour of a HHyperion Dev Create an object of the subclass called course_1 and call the following methods O contact details O trainer_details O show_course_id These methods should all print out the correct information to the terminal. ● ● person. Create an Adult class with the following attributes and method: O Attributes: name, age, eye_colour, and hair_colour O A method called can_drive() which prints the name of the person and that they are old enough to drive. Create a subclass of the Adult class named Child that has the same attributes, but overrides the can_drive() method to print the person's name and that they are too young to drive. Create some logic that determines if the person is 18 or older and create an instance of the Adult class if this is true. Otherwise, create an instance of the Child class. Once the object…1. Create the main method using pythone to test the classes. #Create the class personTypefrom matplotlib.pyplot import phase_spectrum class personType: #create the class constructor def __init__(self,fName,lName): #Initialize the data members self.fName = fName self.lName = lName #Method to access def getFName(self): return self.fName def getLName(self): return self.lName #Method to manipulate the data members def setFName(self,fName): self.fName = fName def setLName(self,lName): self.lName = lName #Create the class Doctor Type inherit from personTypeclass doctorType(personType): #Create the constructor for the doctorType class def __init__(self, fName, lName,speciality="unknown"): super().__init__(fName, lName) self.speciality = speciality #Methods to access def getSpeciality(self): return self.speciality #Methods to manipulate def setSpeciality(self,spc):…
- Please create this Thank You Create a Java program that will store the book isbn number, title, and author in an array.Specifications:Classes:Books class and Technology class, where, Books is a superclass and Technology is a subclass.Technology will inherit all properties in the Books class.Books class has the following protected attributes: array of Isbn number, array of titles, and array of authors(consider one author per entry).Books class has Isbn Adder method that will add the ISBN number, author, and title to the arrays in the Books class..Books class also have a method to display all books.create a main method in the Technology class, and create an instance of Books.Add book, author, and title to the books class using ISBN adder method. Add atleast 10 books.Display all books.Please answer this question properly must attach output screenshot IN PYTHON create a User class with with 2 attributes : first_name, last_name, hireDate, age, job_title . create a method named describe_user() that prints all the info for the user create a 'great_user() method that prints a personalized greeting to the user add an attribute named login_attempts to the user class from 1 above write a method called increment_login_attempts() that increments the login_attempts value by 1 write another method called reset_login_attempts () that resets the value of login_attempts to 0 Make an instance of the User class and call increment_login_attempts() several times. Print the value of login_attempts to make sure it was incremented properly. Make an instance of the User class and call reset_login_attempts(). Print the value of login_attempts to make sure it was reset to 0. Write a class called Admin that inherits from from User class you wrote above Add an attribute, privileges, that…A library wants to manage its collection of books and authors more efficiently. They would like to create a Python program to help with this task. The following requirements need to be implemented: Create an Author class with the attributes: name, dob (date of birth), and nationality. The class should have a __str__ method to represent the author in a user-friendly format. Create a Book class with the following attributes: title, author (an instance of the Author class), publication_date, and price. Also, include a class variable all_books that keeps a list of all book instances created.The Book class should have: A __str__ method to represent the book in a user-friendly format. A __eq__ method to compare two books. Two books are considered the same if they have the same title and author. A __lt__ method to compare two books based on their publication dates. A class method get_all_books that returns a list of all books in the library. A static method most_expensive_book that takes…
- Use the code provided copied to a new file named compulsory_task_1.py: 1. Add another method in the Course class that prints the head office location: Woodstock, Cape Town2. Create a subclass of the Course class named OOPCourse3. Create a constructor that initialises the following attributes and assigns these values: --- "description" with a value "OOP Fundamentals" --- "trainer" with a value "Mr Anon A. Mouse"4. Create a method in the subclass named "trainer_details" that prints what the course is about and the name of the trainer by using the description and trainer attributes.5. Create a method in the subclass named "show_course_id" that prints the ID number of the course: #123456. Create an object of the subclass called course_1 and call the following methods contact_details trainer_details show_course_id These methods should all print out the correct information to the terminal On a side note, this task covers single inheritance. multiple inheritance is also…1. Create a class called Student, with the following attributes/variables:a. studentName (String)b. studentNumber (int)sc. regYear(long)d. faculty(String)e. department(String)2. Add the following methods in Student:a. accessors and mutators for all variablesb. toString methodi. Formulate your toString so that it only shows studentName,studentNumber and faculty3. Create a class called MyFriends, with the following attributes variables:a. studentArray(Student[])4. Add the following methods in MyFriends:a. fillArrayi. Using scanner ask how many students does the user want to inputii. Capture user input for all of his friends(Of course we are assuming all your friends would be similarUWC students, go ask around and meet new friends, alsopreferably not in the same Computer Science department … ifpossible … only if possible)b. maini. Call the fillArray methodii. Count how many Computer Science studentsiii. If half or more students are Computer Science students, thendisplay “You … need more…Task 5 Create an Employee Class that will have Two instance variable: name and workingPeriod A class method named employeeByJoiningYear(): • To create an Employee object by joining year for calculating the working period o it will have two Parameter name and year • A static method experienceCheck() to check if an Employee is experienced or not o It will take working period and gender as parameter o If an employee's working period is less than 3, he or she is not experienced [You are not allowed to change the code below] # Write your code here employee1 = Employee('Dororo', 3) employee2 = Employee.employeeByJoiningYear('Harry', 2016) 5 print(employee1.workingPeriod) print(employee2.workingPeriod) print(employee1.name) Оutput 3 Dororo Harry He is not experienced She is experienced print(employee2.name) print(Employee.experienceCheck(2, "male")) print(Employee.experienceCheck(3, "female"))
- Objectives: At the end of this activity, you should be able to: define classes implement polymorphism and inheritance instantiate an object array apply Exception to all input validations create a Java application for multiple users Procedure: Create a NetBeans project for this activity. The project name should be as follows: o Client (the main class that contains the main method and the implementation of the main menu) o Credit (the class where attributes and methods are defined) The class names to be created are the following: o Client<your_last_name> Ex. ClientBlancoo Credit<your_last_name> Ex. CreditBlanco All class names must be suffixed with your last name. Note that the object to be instantiated in the main method is an object array.For example: CreditBlanco [ ] cb = new CreditBlanco [100]; Compress the NetBeans project into .rar or .zip format and then upload to the link provided in the LMS. Only NetBeans project compressed in .rar or .zip format will be…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:Main.java - Notepad A learn.zybooks.com/zybook/MCLACSC1328CohenSpring2022/chapter/5/section/2 Main.java - Notepad O Main.java - Notepad = zyBooks My librar Order, Item, Customer File Edit Format View Help File Edit Format View Help The class diagram below shows an Order class that "has a" Customer and zero or more Items. Order Item 0.* private Customer m_cust; private ArrayList m_items; private String m_desc private int m_qty private double m_price public Order(Customer cust) public void additem(Item i) public String toString() public Item(String desc, double price, int qty) public String toString) 1.1 Customer private String m_first; private String m_last; public Customer(String first, String last) public String toString) Please create the Order, Customer, and Item classes shown above. I have provided you with a read only Main class that you can use to test your code (you can download it below). You can use this to test your code, but there is no need to submit it to zyBooks. I will…