Description
HTML code for a simple calculator
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Hey, thank ...
Completion Status:
100%
Review
Review
Anonymous
Super useful! Studypool never disappoints.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
ITC206 Colorado State University Application of Programming in Java Project
Task 1For this task you will create a Subject class, whose instances will represent the subjects for study at a university ...
ITC206 Colorado State University Application of Programming in Java Project
Task 1For this task you will create a Subject class, whose instances will represent the subjects for study at a university. A subject will have a name, just a String, and a subject code, which is a six-character String. The first three characters of a subject code are alphabetic and the last three are numeric. The first three characters define the subject's discipline area. A subject code must be unique but do not need to check subject name for uniqueness.You will also write a TestSubject class to test the use of your Subject class. In particular this will maintain an array of subjects. In order to manage the uniqueness of the subject codes, your program will need to display information about existing subject codes as well as checking that any new subject code supplied by the user is not the same as any existing subject code.The following state and functionality should be provided for the Subject class:Two fields will hold the subject’s name (Programming in java 1) and the six-character subject code (ITC206).A constructor will allow a name and a new, validated subject code to be provided when a new subject is created.Getters will provide access to the attributes.An accessor method called codeMatches will return a boolean value indicating if the subject's code matches the string argument provided. "Matches" is used here in the same sense as for the matches method of the String class.A toString method will return a string containing the subject code and subject name.To assist with managing subject codes and their uniqueness you will provide the Subject class with some class methods as follows (you may add more method9s) if you need):An isValidCode method will accept a string that is a possible new subject code, and return a boolean indicating whether it satisfies the structural requirements for a subject code (i.e. first three characters are letters and last three characters are digits).A codeExists method will accept an array of Subject objects and a possible new subject code. It will return a boolean indicating whether that code has already been allocated to one of the subjects in the array.Your TestSubject program will perform the following sequence of actions, using good design techniques such as in the appropriate use of methods:An initial array of Subject objects will be created from any data in a file that was previously saved by the program (not using programming in java, just open a text file and write subject name and code and then save the file). You need to read those data from the file and process other requirements (using java programming)The user interaction will then proceed to allow the user to add one or more new subjects to the array. If the user wishes to add new subjects, the existing subjects should be displayed. Each subject code entered by the user should be checked against the existing subject codes. The user can enter any new subject, but only non-existing subject codes and their names should be added in the subject list, otherwise, give opportunity to enter new code if the entered subject code already exists in the list. The user should be given the choice of repeating the processing for more subjects.When the user has finished adding subjects, and only if subjects have indeed been added, the program will overwrite the data file with the updated data if anyone open the file using file explorer, he/she can see the all subjects including the newly added subjects.Note:You may use an ArrayList to implement an array if you prefer and it is appropriate.You need to submit java and class files and sample output (for detail please see marking guide and presentation below). Task 2Design a class named MyRectangle2D class that extends GeometricObject class (see GeometricObject class in the textbook or below).The MyRectangle2D class contains: Two double data fields named x and y that specify the centre of the rectangle with get and set methods. (Assume that the rectangle sides are parallel to x- or y- axis.)Write get and set methods to access the double data fields width and height Write a no-argument constructor that creates a default rectangle (or square) with (0, 0) for (x, y) and 1 for both width and height.Write A constructor that creates a rectangle with the specified x, y, width, and height,use the following method header: public MyRectangle2D(double x, double y, double width, double height) Write a method named getArea(), that returns the area of the rectangle.Write a method named getPerimeter() that returns the perimeter of the rectangle.Write a method named contains, has two double type of parameters: contains (double x, double y) It returns true if the specified point (x, y) is inside this rectangle. Overload method contains with one parameter MyRectangle2D: contains (MyRectangle2D r) This method returns true if the specified rectangle is inside this rectangle. Draw the UML diagram for the class. To save time, omit the accessor and mutator methods.Implement data fields, all constructors, methods getArea(), getPerimeter(), and contains(double x, double y). Write a test program to create objects and test properties: getArea(), getPerimeter(), contains(double x, double y) and contains(MyRectangle2D r).Draw the UML diagram that involves the class Triangle. Implement the clas. Write a test program that creates a Triangle object with sides 3.0, 4.0, 5.0, color yellow and filled true, and displays the area, perimeter, color, and whether filled or not. GeometricObject class is given below. You need to submit java and class files, UML diagram, and sample output .
Data Security
Assignment: Min of 1350 words with three scholar references in APA format. 1. Select three certifications and discuss the ...
Data Security
Assignment: Min of 1350 words with three scholar references in APA format. 1. Select three certifications and discuss the type of individual who may be interested in pursuing each one. (CISSP: Certified Information Systems Security Professional, CISM: Certified Information Security Manager, and CompTIA Security+) 2. Describe the typical duties of a security manager that are strictly managerial and not technical in nature. 3. Describe the three categories of information security professionals. (Professionals who do the risk management, Process professionals, and professionals for law and regularities) 4. Describe the role of due care and due diligence in terms of their role in reducing liability exposure.
Unit 1 individual project
Assignment Details Assignment DescriptionThroughout this course, you will be learning about object-oriented programming an ...
Unit 1 individual project
Assignment Details Assignment DescriptionThroughout this course, you will be learning about object-oriented programming and demonstrating what you learn by writing some programs in Java. The first step will be to install and integrated development environment (IDE) that will be where you will write and compile your programs. You will also write your first program using Java to show that you have correctly installed the IDE.The project instructions and deliverables are as follows:Download and install Java JDK and NetBeans IDE using the default installation optionsRun the IDE and take a screenshot.Create a console program that prompts the user to enter these three pieces of information:The name of their favorite restaurantThe address of the restaurantTheir favorite meal at the restaurantStore in memory the three pieces of information above, each in a separate variable.Display this information on screen, showing each input on a separate line.Run your program and take a screenshot.Create a document in Word, and add the following:Title page which includes: Course Number, Course Section, Course Name, Project Name (Unit 1 IP), Student Name and DateScreenshot showing the IDE runningScreenshot showing the program runningCreate a zip that includes your project folder and Word document and upload it to the portal.
Help fix python code
In this task, we will write a program test9.py, which uses classes and objects to deal a hand of cards, score it according ...
Help fix python code
In this task, we will write a program test9.py, which uses classes and objects to deal a hand of cards, score it according to the number of pairs, three-of-a-kind, and four-of-a-kind sets, and then show the hand with a graphical interface using a custom widget.Evaluating a hand of cardsWe consider an imaginary game in which each hand of cards is scored according to the number of pairs, three-of-a-kind, and four-of-a-kind sets it contains:Four of a kind (e.g. 7♠ 7♥ 7♣ 7♦): +100 pointsThree of a kind (e.g. 8♥ 8♣ 8♦): +10 pointsPair (e.g. 9♠ 9♣): +1 pointFor example, the following hand of 10 cards:5♠ 5♣ 5♦ 7♥ 7♦ J♦ A♠ A♥ A♣ A♦evaluates as:10 + 1 + 0 + 100 = 111Step-by-step implementation:Using the provided classes Card and Deck, write a function deal(n) that creates a randomly shuffled deck and deals a hand of n cards, which are returned as a list.Write a function evaluate(hand), which, given a list of card objects, evaluates it according to the rules described in the previous section and returns the score. (Exercise 6 from Unit 5 can be helpful for implementing this.)Write a text user interface that repeatedly asks the user how many cards should be dealt, creates a hand of the requested size and evaluates it. The program should check that the user input is an integer (use isdigit) and is in the range 0 ≤ n ≤ 52. Example:Number of cards: 5
10 of hearts
6 of spades
8 of diamonds
ace of clubs
jack of hearts
-----------> Score: 0
Number of cards: 7
2 of diamonds
10 of diamonds
10 of spades
10 of clubs
king of diamonds
ace of clubs
9 of diamonds
-----------> Score: 10
Number of cards: 20
6 of hearts
8 of diamonds
8 of spades
10 of hearts
2 of clubs
2 of diamonds
7 of hearts
6 of diamonds
4 of diamonds
4 of hearts
queen of spades
6 of spades
3 of spades
9 of spades
7 of diamonds
8 of hearts
2 of spades
4 of clubs
8 of clubs
5 of diamonds
-----------> Score: 131
Number of cards: 3
king of clubs
9 of hearts
jack of hearts
-----------> Score: 0
Number of cards: 10
ace of spades
king of hearts
jack of diamonds
queen of spades
8 of diamonds
8 of spades
9 of clubs
jack of hearts
ace of clubs
king of diamonds
-----------> Score: 4Make a widget CardsFrame derived from Frame, which holds a list of buttons with card names on them. Its __init__ function should receive a list of Card objects as a parameter, specifying which cards should be shown:You don’t need to specify the ['command'] options for the buttons, thus clicking a button will do nothing.Make a Tkinter interface for the program, using the enhancedEntry and CardsFrame widgets. When the user presses the button 'Deal', a new hand is generated, CardsFrame should be updated (you can destroy the old widget replacing it with a new one), and the score of the new hand should be shown in the corresponding label:One can program a card game using an improved version of the CardsFrame widget. It will require setting up ['command'] options on the buttons within the frame.I have the code completed and it works correctly to ,my knowledge. however, for some reason, its incorrect. please help fix the error according to instructions.
Similar Content
Santa Monica College C++ Programming Code
Santa Monica College
CS 20A: Data Structures with C++
Assignment 3
Name:
ID:
1. Write delete statements that correctl...
Data Analytics - R code and Tableau
I need help writing the code for a Data Analytics report. I need you to do R code and Tableau visualizations.I have attach...
Mobile Device Attacks (Paper)
Prepare a 6-8 page paper in Microsoft Word using approved APA format.The minimum page count cannot not include your Title ...
Customer Segmentation Using K Means Clustering Case Study
Part 1)
Read the Case Study: Customer Segmentation Using K Means Clustering from Towards Data Science
https://towardsdatas...
Harvard University Machine Learning Algorithms in Rstudio Coding
I'm working on a programming project and need support to help me study.I am working on a project in R on the babynames dat...
ISSC 362 American Military University Malware Paper
Write a paper on any of the following topics:
- Mobile device attacks
- Application security in large enterprises
- Think...
Assignment 10
It is very important to know issues and risks that a software faces through testing.in this case, parking calculator appli...
Cobweb
text(-1.8,1.2,"f(x) = (3x - x^3) / 2",FontWeight="bold")...
Untitled Document.edited
You are very correct that while there is an abundance of libraries, they always seem to come with updates quarterly and du...
Related Tags
Book Guides
Underground A Human History of the Worlds Beneath our Feet
by Will Hunt
Into the Wild
by Jon Krakauer
Don Quixote
by Miguel de Cervantes
The Old Man and the Sea
by Ernest Hemmingway
Cry the Beloved Country
by Alan Paton
The Point of it All - A Lifetime of Great Loves and Endeavors
by Charles Krauthammer
Herzog
by Saul Bellow
A Wrinkle as Time
by Madeleine L'Engle
The Adventures of Huckleberry Finn
by Mark Twain
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
ITC206 Colorado State University Application of Programming in Java Project
Task 1For this task you will create a Subject class, whose instances will represent the subjects for study at a university ...
ITC206 Colorado State University Application of Programming in Java Project
Task 1For this task you will create a Subject class, whose instances will represent the subjects for study at a university. A subject will have a name, just a String, and a subject code, which is a six-character String. The first three characters of a subject code are alphabetic and the last three are numeric. The first three characters define the subject's discipline area. A subject code must be unique but do not need to check subject name for uniqueness.You will also write a TestSubject class to test the use of your Subject class. In particular this will maintain an array of subjects. In order to manage the uniqueness of the subject codes, your program will need to display information about existing subject codes as well as checking that any new subject code supplied by the user is not the same as any existing subject code.The following state and functionality should be provided for the Subject class:Two fields will hold the subject’s name (Programming in java 1) and the six-character subject code (ITC206).A constructor will allow a name and a new, validated subject code to be provided when a new subject is created.Getters will provide access to the attributes.An accessor method called codeMatches will return a boolean value indicating if the subject's code matches the string argument provided. "Matches" is used here in the same sense as for the matches method of the String class.A toString method will return a string containing the subject code and subject name.To assist with managing subject codes and their uniqueness you will provide the Subject class with some class methods as follows (you may add more method9s) if you need):An isValidCode method will accept a string that is a possible new subject code, and return a boolean indicating whether it satisfies the structural requirements for a subject code (i.e. first three characters are letters and last three characters are digits).A codeExists method will accept an array of Subject objects and a possible new subject code. It will return a boolean indicating whether that code has already been allocated to one of the subjects in the array.Your TestSubject program will perform the following sequence of actions, using good design techniques such as in the appropriate use of methods:An initial array of Subject objects will be created from any data in a file that was previously saved by the program (not using programming in java, just open a text file and write subject name and code and then save the file). You need to read those data from the file and process other requirements (using java programming)The user interaction will then proceed to allow the user to add one or more new subjects to the array. If the user wishes to add new subjects, the existing subjects should be displayed. Each subject code entered by the user should be checked against the existing subject codes. The user can enter any new subject, but only non-existing subject codes and their names should be added in the subject list, otherwise, give opportunity to enter new code if the entered subject code already exists in the list. The user should be given the choice of repeating the processing for more subjects.When the user has finished adding subjects, and only if subjects have indeed been added, the program will overwrite the data file with the updated data if anyone open the file using file explorer, he/she can see the all subjects including the newly added subjects.Note:You may use an ArrayList to implement an array if you prefer and it is appropriate.You need to submit java and class files and sample output (for detail please see marking guide and presentation below). Task 2Design a class named MyRectangle2D class that extends GeometricObject class (see GeometricObject class in the textbook or below).The MyRectangle2D class contains: Two double data fields named x and y that specify the centre of the rectangle with get and set methods. (Assume that the rectangle sides are parallel to x- or y- axis.)Write get and set methods to access the double data fields width and height Write a no-argument constructor that creates a default rectangle (or square) with (0, 0) for (x, y) and 1 for both width and height.Write A constructor that creates a rectangle with the specified x, y, width, and height,use the following method header: public MyRectangle2D(double x, double y, double width, double height) Write a method named getArea(), that returns the area of the rectangle.Write a method named getPerimeter() that returns the perimeter of the rectangle.Write a method named contains, has two double type of parameters: contains (double x, double y) It returns true if the specified point (x, y) is inside this rectangle. Overload method contains with one parameter MyRectangle2D: contains (MyRectangle2D r) This method returns true if the specified rectangle is inside this rectangle. Draw the UML diagram for the class. To save time, omit the accessor and mutator methods.Implement data fields, all constructors, methods getArea(), getPerimeter(), and contains(double x, double y). Write a test program to create objects and test properties: getArea(), getPerimeter(), contains(double x, double y) and contains(MyRectangle2D r).Draw the UML diagram that involves the class Triangle. Implement the clas. Write a test program that creates a Triangle object with sides 3.0, 4.0, 5.0, color yellow and filled true, and displays the area, perimeter, color, and whether filled or not. GeometricObject class is given below. You need to submit java and class files, UML diagram, and sample output .
Data Security
Assignment: Min of 1350 words with three scholar references in APA format. 1. Select three certifications and discuss the ...
Data Security
Assignment: Min of 1350 words with three scholar references in APA format. 1. Select three certifications and discuss the type of individual who may be interested in pursuing each one. (CISSP: Certified Information Systems Security Professional, CISM: Certified Information Security Manager, and CompTIA Security+) 2. Describe the typical duties of a security manager that are strictly managerial and not technical in nature. 3. Describe the three categories of information security professionals. (Professionals who do the risk management, Process professionals, and professionals for law and regularities) 4. Describe the role of due care and due diligence in terms of their role in reducing liability exposure.
Unit 1 individual project
Assignment Details Assignment DescriptionThroughout this course, you will be learning about object-oriented programming an ...
Unit 1 individual project
Assignment Details Assignment DescriptionThroughout this course, you will be learning about object-oriented programming and demonstrating what you learn by writing some programs in Java. The first step will be to install and integrated development environment (IDE) that will be where you will write and compile your programs. You will also write your first program using Java to show that you have correctly installed the IDE.The project instructions and deliverables are as follows:Download and install Java JDK and NetBeans IDE using the default installation optionsRun the IDE and take a screenshot.Create a console program that prompts the user to enter these three pieces of information:The name of their favorite restaurantThe address of the restaurantTheir favorite meal at the restaurantStore in memory the three pieces of information above, each in a separate variable.Display this information on screen, showing each input on a separate line.Run your program and take a screenshot.Create a document in Word, and add the following:Title page which includes: Course Number, Course Section, Course Name, Project Name (Unit 1 IP), Student Name and DateScreenshot showing the IDE runningScreenshot showing the program runningCreate a zip that includes your project folder and Word document and upload it to the portal.
Help fix python code
In this task, we will write a program test9.py, which uses classes and objects to deal a hand of cards, score it according ...
Help fix python code
In this task, we will write a program test9.py, which uses classes and objects to deal a hand of cards, score it according to the number of pairs, three-of-a-kind, and four-of-a-kind sets, and then show the hand with a graphical interface using a custom widget.Evaluating a hand of cardsWe consider an imaginary game in which each hand of cards is scored according to the number of pairs, three-of-a-kind, and four-of-a-kind sets it contains:Four of a kind (e.g. 7♠ 7♥ 7♣ 7♦): +100 pointsThree of a kind (e.g. 8♥ 8♣ 8♦): +10 pointsPair (e.g. 9♠ 9♣): +1 pointFor example, the following hand of 10 cards:5♠ 5♣ 5♦ 7♥ 7♦ J♦ A♠ A♥ A♣ A♦evaluates as:10 + 1 + 0 + 100 = 111Step-by-step implementation:Using the provided classes Card and Deck, write a function deal(n) that creates a randomly shuffled deck and deals a hand of n cards, which are returned as a list.Write a function evaluate(hand), which, given a list of card objects, evaluates it according to the rules described in the previous section and returns the score. (Exercise 6 from Unit 5 can be helpful for implementing this.)Write a text user interface that repeatedly asks the user how many cards should be dealt, creates a hand of the requested size and evaluates it. The program should check that the user input is an integer (use isdigit) and is in the range 0 ≤ n ≤ 52. Example:Number of cards: 5
10 of hearts
6 of spades
8 of diamonds
ace of clubs
jack of hearts
-----------> Score: 0
Number of cards: 7
2 of diamonds
10 of diamonds
10 of spades
10 of clubs
king of diamonds
ace of clubs
9 of diamonds
-----------> Score: 10
Number of cards: 20
6 of hearts
8 of diamonds
8 of spades
10 of hearts
2 of clubs
2 of diamonds
7 of hearts
6 of diamonds
4 of diamonds
4 of hearts
queen of spades
6 of spades
3 of spades
9 of spades
7 of diamonds
8 of hearts
2 of spades
4 of clubs
8 of clubs
5 of diamonds
-----------> Score: 131
Number of cards: 3
king of clubs
9 of hearts
jack of hearts
-----------> Score: 0
Number of cards: 10
ace of spades
king of hearts
jack of diamonds
queen of spades
8 of diamonds
8 of spades
9 of clubs
jack of hearts
ace of clubs
king of diamonds
-----------> Score: 4Make a widget CardsFrame derived from Frame, which holds a list of buttons with card names on them. Its __init__ function should receive a list of Card objects as a parameter, specifying which cards should be shown:You don’t need to specify the ['command'] options for the buttons, thus clicking a button will do nothing.Make a Tkinter interface for the program, using the enhancedEntry and CardsFrame widgets. When the user presses the button 'Deal', a new hand is generated, CardsFrame should be updated (you can destroy the old widget replacing it with a new one), and the score of the new hand should be shown in the corresponding label:One can program a card game using an improved version of the CardsFrame widget. It will require setting up ['command'] options on the buttons within the frame.I have the code completed and it works correctly to ,my knowledge. however, for some reason, its incorrect. please help fix the error according to instructions.
Earn money selling
your Study Documents