2023 QUESTION 1 TCOs 1 8 NOTE YOU DO NOT have to compile run this | Assignment Collections
Computer Science 2023 A+ Answers
2023 QUESTION 1 TCOs 1 8 NOTE YOU DO NOT have to compile run this | Assignment Collections
QUESTION 1.. (TCOs 1–8) NOTE: YOU DO NOT have to compile/run this code in eclipse. You are writing the code here only.
Write a class called point
that has attributes and methods to model an (x,y) coordinate in a 2-D environment.
Select appropriate variable(s).
Write a default and parameterized constructor.
Write set and get methods for the variables.
Write a Print method to display the variables when called.
Write a test program to test the methods. (Points : 20)
QUESTION 2.
Write a class called circle which inherits from the above point class.
A circle consists of a point which is the center of the circle and a radius.
Select appropriate class variable(s).
Write constructors.
Write set and get methods for the variables.
Override the inherited Print method to display variable in circle and point.
Write a test program to test it. (Points : 20)
QUESTION 3. (TCOs 1–8) Start from the following code, and add Action Listener to make it functional. The user inputs a weight in pounds or kilograms in the appropriate textbox, then clicking the arrow will convert and display the result. (Note ONLY code the ACTION LISTENER, you should only need about 10 lines of code)
Note: 1 lb = .0.453592 kg.
import javax.swing.*;
import
java.awt.GridLayout;
import
java.awt.event.*;
import
java.text.DecimalFormat;
QUESTION 4.
(TCOs 1–8) Start from the given class, and create a NewPanel class to draw a figure like below: YOU DO NOT have to compile/run this code in eclipse. You are writing the code here only. Need about 15 lines of code.
import javax.swing.*;
import java.awt.Color;
import
java.awt.Graphics;
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.