Concept explainers
i need you to use object-orientated programming
please follow the screenshot as a reference which is posted.
can you make it so it reads from the kongcrew.txt file instead of typing out the info?
can you also make where it lists all of the specifications with the information below like the bolded text in the picture? example below
Name Sit Walk Swing ....... and so on with the info below (make one print out before adding the second ss and after so it shows the updated info of how many bananas the monkeys have before and after)
FOLLOW THE INSTRUCTIONS AND DO EVERYTHING ASKED AND REQUIRED
instructions in the picture, KongCrew.txt file with the info below.
Donkey Kong Y Y Y N 3 3 1981 Donkey
Cranky Kong Y Y N Y 1 0 1985 Donkey
Dixie Kong Y Y N Y 2 2 2001 Dixie
Kiddy Kong Y N Y N 1 1 2003 Dixie
Wrinkly Kong N N Y Y 1 2 1985 Donkey
Tiny Kong N N Y Y 2 1 2001 Dixie
Diddy Kong Y Y Y N 3 2 1985 Donkey
Uncle Kong Y N Y N 1 2 1990 Donkey
Chunky Kong N Y Y Y 2 5 2007 Dixie
Step by stepSolved in 4 steps with 4 images
- Please help with 3rd section (in images below), code for first and second class included below. Do not change the function names or given starter code in the script. Each class has different requirements, read them carefully. Do not use the exec or eval functions, nor are you allowed to use regular expressions (re module). All methods that output a string must return the string, not print it. If you are unable to complete a method, use the pass statement to avoid syntax errors. class Stack: def __init__(self): self.stack = [] def pop(self): if len(self.stack) < 1: return None return self.stack.pop() def push(self, item): self.stack.append(item) def size(self): return len(self.stack) def peek(self): return self.stack[self.size() - 1] def isEmpty(self): if len(self.stack) < 1: return True return False class Calculator: def __init__(self): self.__expr = None…arrow_forwardMy program is not working properly. I input a screenshot of the assignment and my form, the code that I have written is directly under this. Please tell me how to correct it, I am supposed to use checkboxes to purchase the number of tickets that I want and then all of the ticket information is supposed to appear on the other side. using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace Final{public partial class Form1 : Form{ static int count1 = 0, count2 = 0, count3 = 0, car1Sale = 0, car2Sale = 0, car3Sale = 0;public Form1(){InitializeComponent();}private void checkBox1_CheckedChanged(object sender, EventArgs e){chkPanel1();textBox4.Text = Convert.ToString(count1 + count2 + count3);saleCalulate(); }private void checkBox14_CheckedChanged(object sender, EventArgs e){chkPanel2();textBox4.Text = Convert.ToString(count1 + count2 +…arrow_forwardWith the new one-parameter constructor that takes the size of the turtle, we can modify the instantiation of the turtles. In the Gui class in the edu.westga.cs1301.project1.view package. Do the following: In the Gui constructor, for the instantiation of the first turtle replace the call to the DoodleTurtle default constructor with a call to the one-parameter constructor and pass in a size of 30. Do the same for the second turtle but give it a size of 15.public class Gui extends GraphicsProgram { public static final int APPLICATION_WIDTH = 900; public static final int APPLICATION_HEIGHT = 900; private static final long serialVersionUID = 1L; private DoodleController sketchPad; private StatisticsController statsController; private DoodleTurtle turtle1; private DoodleTurtle turtle2; /** * Constructs and initializes the GUI. * * @precondition none * @postcondition none */ public Gui() { this.turtle1 = new DoodleTurtle();…arrow_forward
- I also am struggling with this project but do not understand this code. The problem I have uses a main.cpp file alongside a dateTypelmp.cpp file. This solution does not solve the task as I understand it to be. The class dateType was designed to implement the date in a program, but the member function setDate and the constructor do not check whether the date is valid before storing the date in the member variables. Function setDate and the constructor need to be rewrit so that the values for the month, day, and year are checked before storing the date into the member variables. A member function should be included, isLeapYear, to check whether a year is a leap year. Input should be format month day year with each separated by a space. Output should resemble the following: Date #: month-day-year If the year is a leap year, print the date and a message indicating it is a leap year, otherwise print a message indicating that it is not a leap year. The header file for the class dateType has…arrow_forwardNeed help with the following: Adding comments to help explain the purpose of methods, classes, constructors, etc. to help improve understanding. Implementing enhanced for loop (for each loop) to iterate over the numbers array in the calculateProduct method. Creating a separate class for the UI and a separate class for the calculator logic. Lastly, creating a constant instead of hard coding the number "5" in multiple places. Thank you for any input/knowldge you can transfer to me, I appreciate it. Source Code: package implementingRecursion; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class RecursiveProductCalculator extends JFrame { private JTextField[] numberFields; private JButton calculateButton; private JLabel resultLabel; public RecursiveProductCalculator() { setTitle("Recursive Product Calculator"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new GridLayout(7, 1)); numberFields = new…arrow_forwardplease may you : create a Python class named Animal with properties for name, age, and a method called speak. also include an initializer method for the class and demonstrate how to create an instance of this class. and extend the Animal class by adding a decorator for one of its properties (e.g., age). please include both a getter and a setter for the property, and demonstrate error handling.arrow_forward
- I need you to write me the answers on paper. For 1. Expand in two object universe (the objects are named ‘a’ and ‘b’) For part 2. Indicate which variables are free and which are bound ( you can use ‘F’ for free and ‘B’ for bound). Either (i) draw a vertical line underneath each variable with the letters ‘F’ or ‘B’ at the bottom of each vertical line or (in) color bound variables red and free variables green.arrow_forwardIs it possible to put a temporary stop to the progression of a single operation while it is being carried out? Your comments should always be supported by logical arguments, no matter what kind they are?arrow_forwardRefer to the following interface: Provide two examples (screenshots) that in many ways could improve the above or similar interface using the principles of direct manipulation. Explain the relevant improvements as well. (Examples might have different object, labels and organization)arrow_forward
- For this lab task, you will work with classes and objects. Create a class named text that works similar to the built-in string class. You will need to define a constructor that can be used to initialize objects of this new class with some literal text. Next, define three methods: to_upper() that will convert all characters to uppercase, reverse() that will reverse the text and length() that will return the length of the text. After you have completed this part, copy the following mainfunction to your code and check if the implementation is correct. int main() { text sample = "This is a sample text"; cout << sample.to_upper(); // This should display "THIS IS A SAMPLE TEXT" cout << endl;cout << sample.reverse(); // This should display "txet elpmas a si sihT"cout << endl; cout << sample.length(); // This should display 21 }arrow_forwardFull comments and a java language implementation are needed. Write some code so that your name is shown in red font inside a blue frame, then save the file.arrow_forwardWrite a main method, in which you should have an Arralylist of students, in which you should include every student. You should have a PhD student named Joe Smith. In addition, you should create an Undergraduate student object for each of your team members (setting their names). If you’re only one person doing the assignment, then you should just create one undergraduate object. For each undergraduate student, you should add add two courses (COIS 2240 and COIS 1020). Loop over the arraylist of students, print their names, if the student is an undergraduate student, print their courses.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education