OOP Week 3 Assignment

| October 22, 2018

Answer the following questions by
the end of the cycle Wednesday night and place the response in the assignment
folder. You should use the
text, discussion (things you and your peers have said or uncovered that help
you solve the problems) and/or other resources to formulate your answers – just
remember not to directly discuss these questions until after I have posted the
answers next week. At that time, in the main folder for seminar 3, you
may ask any lingering questions about the assignment for this week that you
would like.
I would prefer it if you attach a
Word or .java file with your coding answer to your assignment post rather than
embedding the code in the message – attaching the Word or .java files make it
much easier for me to check your code for any problems you may have
Using JOptionPanes to handle your
input and output, produce a Java program which, given three sides of a
triangle, determines whether the triangle is:
1. Equilateral – all sides the
same length,
2. Isosceles – two sides the
same length or
3. Scalene – no sides the same
(see Figure
1). Assume that any individual side must be a positive number
not greater than 100.0.
Also use an appropriate loop to
allow the user to repeat the above actions until they choose to exit the
Figure 1: Triangle Types
Remember to write the source code
for each class in a separate file which must have the same name as the class
name together with the extension .java.
Remember also that by convention, class names commence with a capital letter.
As with all programs you write, you
should provide a well-structured solution that is easy to read. You
should use meaningful identifier names and should provide useful
comments. A large proportion of the marks for this assignment will be
based on the structure of your classes, not whether they do or don’t work
The focus of the
assignment is for you to familiarise yourself with the Java concepts introduced
in this seminar (loops, decision structures, etc.). If you
have difficulty with the assignment, you may discuss these problems in the
discussion folder as long as you do not directly discuss the assignment
In the event of
compilation problems (i.e. your program will not compile), do not post entire
classes and ask what is wrong with them.
This would violate the above stricture of not discussing the assignment
problems in the main folder. Instead, try and identify the source of the
problem through a process of elimination (by commenting out chunks of the
code). You may discuss error messages you may receive, and you may
discuss compilation problems with the lecture applications, and perhaps these
discussions will help you to figure out where your errors lie. In
addition, you may always contact me via private e-mail if you are having a
specific problem and none of the above solutions seem to work for you.
Please use this option as a last resort, however!
It is a good idea to work in a
step-by-step top-downmanner. For example, first define the
general structure of a class with empty methods and compile the file.
Once it compiles successfully, then start adding further detail, recompiling
after every few lines. This way, the risk of getting a screen full of
error messages is reduced, and you can be assured of handing in something that
works by the end of the week.
Use the
Safe Assign link below to submit your assignment.

Order your essay today and save 30% with the discount code: ESSAYHELP
Order your essay today and save 30% with the discount code: ESSAYHELPOrder Now