Question
INSY 4306 ADVANCED SYSTEMS DEVELOPMENT ASSINGMENT -1 1. INSTRUCTIONS Due date is February 15, 11:59 pm. Late submissions will get 0 points. NO EXCUSE! You
INSY 4306 ADVANCED SYSTEMS DEVELOPMENT ASSINGMENT -1
1. INSTRUCTIONS
-
Due date is February 15, 11:59 pm. Late submissions will get 0 points. NO EXCUSE!
-
You can only use the techniques that you have learned so far. Other techniques will not be accepted.
-
In this assignment, you are expected to upload six Java applications on Blackboard.
o ConvertFrame.javao ConvertTest.java o Vehicle.java o Car.java
o Bicycle.java
o VehicleTest.java
-
You can only upload .java files. Please do not upload .zip files. Upload each
.java files individually.
-
NOTE: If you are using any IDE (Netbeans, Eclipse, etc.), please delete the statement, package xxxxx; from your application. Otherwise, I will get a compilation error, and you will lose 5 pts. It is your responsibility.
-
Each question is independent of each other.
-
Do not forget to add comments to explain how your codes are working!
Short comments are acceptable.
-
Write your codes individually! Do not copy of any of them from someone else!
1
2. GRADING POLICY
Case 1: o For each question:
o I will compile your .java files. If any compilation error occurs, 5 ptswill be deducted.
o After that, I will check your algorithms whether they are correct or not. For example; if it says find odd and even numbers. I will check whether it really finds both even and odd numbers. This part will be evaluated based on your work.
o Additionally, comments will be checked whether they clearly and briefly explain what you have done. If comments are missing or not clear, enough, or brief 3 pts will be deducted.
-
Case 2: o For each question:
o If there is not any compilation error:
-
I will try each case scenario as stated in each question. For
example; if it says find odd and even numbers. I will try both even and odd numbers. This part will be evaluated based on your work.
-
Additionally, comments will be checked whether they clearly and briefly explain what you have done. If comments are missing or not clear, enough, or brief 3 pts will be deducted.
-
-
Case 3: o If you do not upload a .java file, I will not evaluate your answer.
-
Case 4: o If it is determined that you copy the codes from someone else, you will
get 0 pt.
2
QUESTIONS
Note: In each question, assume that the user enters correct inputs. You do not handle with exceptions.
1. Design a simple temperature and length converter application. (60 pts - UPLOAD ConvertFrame.java & ConvertTest.java )
The requirements are that:
-
Create a FlowLayout.
-
Display a text (Converter) on the title bar.
-
Add two labels as shown in the figure below.
-
Add two text fields with a size of 5 as shown in the figure below.
-
Add two command buttons as shown in the figure below.
-
A user can press enter in a text field or click on a button to convert temperature from Fahrenheit to Celsius or length from Inch to Centimeter.
-
If a user presses enter in a text field, convert the input and display it.
-
If a user prefers to click on convert button, convert the input and
display it.
-
-
Display the conversion results as integers.
-
Set the width of the frame as 550 and height as 180.
-
Hint: You can use getText() method to get the input from a text field, and
you can use setText() method to display the output in a label.
Sample Output
3
2. Please follow the following statements: (40 pts - UPLOAD Vehicle.java & Car.java & Bicycle.java & VehicleTest.java)
-
Create an abstract class Vehicle including only one abstract method which isGetCarbonFootprint.
-
Create a subclass Car. A car has an instance variable gallon and a constructor. A cars carbon footprint is calculated by gallons *20.
-
Create another subclass Bicycle. A bicycles carbon footprint is 0.
-
Create a test class. Include a Vehicle array with a length of 2. The first element
of it will be a car and the second element of it will be a bicycle.
-
Display carbon footprints of the car and bicycle by calling the method
GetCarbonFootprint polyphormically.
Sample Output
# Can you please write seperate file for all the classes and comment along the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started