WWC Code Programming Question
Description
Unformatted Attachment Preview
Your midterm project will be three parts, evaluated out of a total 100 points. Like the
homeworks, you may work with up to one person on your midterm project. Part 1 is due on
Monday February 27th at 11:59p.To submit Part 1, download your diagram slides as a PDF,
and upload the PDF file to D2L. Parts 2 and 3 are due on Sunday March 12th at 11:59p.To
submit Parts 2 and 3, follow the same guidelines for homeworks in the syllabus.
PART 1: Design your project (25 pts)
Due Monday February 27th at 11:59p.
In Part 1, you will design the structure of your code. Professional programmers rarely jump
straight into their code. Rather, they carefully plan out and architect their projects, much like
someone draws up blueprints before constructing a building. Similarly, you will plan out your
project 7hat data do you want to structure? For example, do you want to model doctors and
patients in hospitals, or perhaps an auto shop with cars and repair people? A good project topic
will consider people, objects, behaviors, actions, etc that you want to model in your code.
Make your own copy of this Google Slides template. You will use it to diagram the
components of your project.
Create a UML diagram for each class (concrete class, abstract class, superclass,
subclass) and for each interface you design. Each UML diagram should appear on a new
slide. Your UML diagrams must include any instance variables, constructors, and
instance methods you plan to include in your code. Your abstract methods must be in
italics. See below for examples.
Create tree diagrams that show the relationships between your classes and interfaces.
Each tree diagram should appear on a new slide. Your diagrams must include any
classes and interfaces you plan to include in your code. Your diagrams must also include
lines showing the relationships between your classes and interfaces. See below for
examples.
Your project structure must include the following:
1 abstract parent class
2 child classes that extend from the abstract parent class
2 grandchild classes that extend from any child classes
1 interface
2 classes that implement the interface (these can be any of the above classes
you already designed)
2 different constructors for every class
2 private variables, with their getter and setter methods, in any class
2 exception handlers using try, catch, and throw (recall: the method that may
throw the exception must also have the throws flag in the method header)
5 concrete methods, implemented in any class
3 abstract methods, declared in any class or interface (and implemented where
appropriate)
PART 2: Implement your project (50 pts)
Due Sunday March 12th at 11:59p.
You designed your code, now itàtime to implement it! Every class and interface should be in its
own .java file. Your code must include everything in the structure checklist from Part 1.
If you decide to make changes from your original design submitted in Part 1, you must also
update your diagrams in Google Slides and submit a new PDF along with your code.
PART 3: Test your project (25 pts)
Due Sunday March 12th at 11:59p.
Now that you have implemented your code, itàtime to test it. You will write your own test driver
called “TestProject.java”. Your testing code must do the following:
construct an object of every concrete class you define
use one of your getters
use one of your setters
use 5 of your methods
implement a try and catch to handle a potential exception thrown by the method called
create 1 linked list containing at least 5 nodes with the objects you constructed
insert a node to the linked list
delete a node from the linked list
search the linked list for an object (returns true if found)
use PrintWriter to print your output to a plain text file named “output.txt”.
you must include your output file along with your code in your submission (if your code
crashes or does not compile, copy and paste any error messages into a text file and
include this instead)
Grading Rubric (100 pts):
Your code will be evaluated by the following criteria:
Part 1: Design your project (25 pts)
A UML diagram for every interface, abstract parent class, concrete child class,
grandchild class, detailing their variables, constructors, and methods: 20
A relationship tree that shows the relationships between all classes and interfaces: 5
Part 2: Implement your project (50 pts)
code does not compile: -25
code compiles but has exception when run: -10
1 abstract parent class: 4
2 child classes that extend from the abstract parent class: 5
2 grandchild classes that extend from any child classes: 5
1 interface: 4
2 classes that implement the interface (these can be any of the above classes you
already designed): 4
2 different constructors for every class: 5
2 private variables, with their getter and setter methods, in any class: 6
2 exception handlers using try, catch, and throw (recall: the method that may throw the
exception must also have the throws flag in the method header): 6
5 concrete methods, implemented in any class 5
3 abstract methods, declared in any class or interface (and implemented where
appropriate): 6
Part 3: Test your project (25 pts)
construct an object of every concrete class you define: 5
use one of your getters: 2
use one of your setters: 2
use 5 of your methods: 2
use a try and catch to handle a potential exception thrown by the method called: 2
create 1 linked list containing at least 5 nodes with the objects you constructed: 2
insert a node to the linked list: 2
delete a node from the linked list: 2
search the linked list for an object (returns true if found): 2
use PrintWriter to print your output to a plain text file named “output.txt”: 2
you must include your output file along with your code in your submission (if your code
crashes or does not compile, copy and paste any error messages into a text file and
include this instead): 2
CS 207 midterm
part 1: design your code
UML diagram example
Course
– courseName: String
– students: String[]
– numStudents: int
+ Course(courseName: String)
+ getCourseName(): String
+ addStudent(student: String): void
+ dropStudent(student: String): void
+ getStudents(): String[]
+ getNumStudents(): int
? class/interface name
? instance variables
? constructors
? instance methods
2
class-interface relationships: example 1
public class RoboDog extends Robot implements Pet {}
Animal Class
Robot Class
Pet Interface
Roomba Class
RoboDog Class
Cat Class
Lion Class
3
class-interface relationships: example 2
public class Camel extends Animal implements Pet, Transport {}
Pet Interface
Animal Class
Camel Class
Lion Class
Transport Interface
4
add your slides below
Purchase answer to see full
attachment

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."