Recent Question/Assignment

NIT3113 Advanced Programming
Geometric Shape Construction Assignment
Due: Week 12 (Demo in Swotvac week) ***No late submission***
Marks: The assignment is 15% of final mark for the unit. You should work with a partner, two students per group is the maximum.
The assignment is composed of three parts. In Part 1 of the assignment is designing classes as per the requirement given in the Lab 01 (Q4 – Design and implement different types of Geometric Objects) and adding new classes. In Part 2, you will create an appropriate GUI and in Part 3, you will create a client and server version of the software.
Problem Description
Refer to Lab 1 Question 4.
Pre-requisite: Lab 1 and Lab 2
Part 1: Application
Use the inheritance hierarchy shown for GeometricObject (in Lab 01, Q4 page 3) and add two classes to represent Equilateral Triangle and Cylinder respectively. Design and create these two additional classes - EquilateralTraingle and Cylinder. Your objective is to reuse as much code as possible.
Design a complete UML diagram for the given case, then design and implement the above requirements.
Part 2: GUI application
Design an appropriate GUI application to set up and run the proposed Geometric Shape that would allow a user to create any Geometric Objects and read a text file containing Geometric object details and print its area and perimeter. You may use the sample design as given in the Lab 02 Question 5.
The GUI for this assignment should create at least two new classes one being the JFrame for displaying the GUI JPanel, and the GUI JPanel with its components.
The GUI needs to be able to allow
• Calculation of area and perimeter of different Geometric Objects based on a user selection.
User should be able to select different Geometric Object and based on the Object type, user is asked to input radius, width, length or sides etc. Then the GUI application calculates and display area and perimeter.
• Reading of Geometric Object information from a file as GeometricOjects.txt and printing out a report of all Geometric Objects information with area and perimeter.
Your GUI application should also contain a button to read a file GeometricObjects.txt. The program should read each line, calculate area and perimeter of the object and display the information in TextArea. Your program must work for any data file in this format as given below, regardless of how many entries.
Format of the data file should be as the following:
Object Type, Data
Example
Circle, 6.0
Rectangle, 3.5, 4.5
Triangle, 2.3, 3,4, 4,2
The appearance of the GUI is entirely up to you to decide. Remember to incorporate as much error checking in your code to prevent user input problem.
Part 3: Server and client versions
For this part of the assignment you may assume that the Geometric Shape Constructor Application is running on the server. The server calculates area and perimeter of the object sent from the client.
The system is sending and receiving data using the User Datagram Protocol (UDP). A client sends an object’s related information – Object type and its attributes example radius/width/length to the server. The server will validate the message received from the client, that, it calculates area and perimeter of the Geometric Object. The server then sends back the message to the client. The server's port number for this assignment is 20171.
The server, may or may not implement the GUI. The server program must continue to listen to the client. There is no need of reading or saving data files.
It is compulsory that you demonstrate your work to your lab instructor on the due date and submit an electronic version on VUCollaborate by or before the due date. Email submissions will not be accepted.
Assignment demonstration (20 minutes) is scheduled during the Swotvac week on 29 May - 2 June 2019. During the demonstration, you will be asked questions on your work and modify/update code too. If you are unable to answer or modify/update code during the demo, you may get 0 for the assignment.
Appointment booking must be done via VU Collaborate. The Appointment Booking link will be opened in Week 10.
If you are working in a group, you must complete a group formation form (only one submission per team) via VU Collaborate by Week 9 Friday 11:55 pm. The link will be
available in the “Assignment” folder.
*** Late submission will NOT be accepted***
Students to work in group of two.
Groups MUST submit ONE copy of the assignment for both students. Each copy must be clearly labeled with both students’ names and student id. numbers. All work must be the group’s own. Any unauthorized collaboration or copying will result in zero for the assignment and possible overall failure in the subject.
What do you have to hand in?
An electronic copy of
1. readme.doc file with information on how to run your program. Include any extra information about your design and program that you wish the marker to know.
2. Summary of tasks allocations – who did what
3. A word document with evidence of trial runs of your program with test cases, i.e. screen printouts of the results where you have tested all the features of your code.
4. UML diagram for all classes in your program
5. A component hierarchy drawing for your GUI design.
6. Code for all the classes that has been compiled and is ready to run. (jGRASP will be used to run and test your application, submit only java files, no class files)
Each class should be fully documented commencing with a heading. In particular, the heading should include your name, subject, assignment details, date written and a brief description of the class. At the start of each method, there should be a comment clearly describing what the method does. If you have a partner, their name and student number is should be clearly identified in the heading beside your name
Assignment Grading
Marks will be awarded based on your program's correctness, clarity, use of comments, completeness and efficiency.
Programs are graded on a 100-mark scale. The marks are assigned as follows:
• 60 marks - Programs meet the specification and are OOP in design.
• Part 1: 15 marks • Part 2: 25 marks
• Part 3: 20 marks
• 10 marks - Error checking code / Test cases
• 20 marks – Documentation and presentation
• 5 marks – UML diagrams for all classes used in your program
• 5 marks - Component hierarchy of the GUI design
• 5 marks - comments
• 5 marks print out of extensive trial runs.
• 10 marks - Overall presentation of work/Demo

Looking for answers ?