CMIS 345
University of Maryland - European Division
Term 4 - 14 April - 22 June 2008
Distance Education
Lecturer: Jerry Rugg
Object Oriented Design and Programming
Lab 2 - Case Converter
Due 15 May 2008
Reading Assignment | Assignment Requirements |
Assignment Turn-in | Assignment Conference
Reading Assignment - Chapters 3 - 5
- Chapter 4: Interface Types and Polymorphism - the basic foundations for designing any application or product are interfaces. We religiously design and write to interfaces.
- Chapter 5: Patterns and GUI Programming - absolutely crucial chapter as it introduces the concept of patterns and uses the Java UI concepts to provide examples. You should in no way think that patterns only apply to GUI programs!.
Assignment Grading
The Assignment Grading policy letter details how I will grade this assignment. The Assignment Grading policy, along with all pertinent programming assignment policies, can be found in the Course Content section of our WebTycho classroom and also on the alternate CMIS 345 Course Home Page. In particular the Naming Conventions, Comments in Code, and Error Handling policies would be worth reading. It would also be beneficial to read through the Assignment Requirements policy letter.
This lab assignment is worth 15% of your final grade. However, based on class results, I reserve the right to change the percentage contribution at the end of the course. One-half, 50%, of the grade will come from the documentation and overall design required below and one-quarter, 25%, from the library code and one-quarter, 25%, from the tester code.
Remember, this assignment is due NLT Thursday, 15 May 2008.
Reading Assignment | Assignment Requirements |
Assignment Turn-in | Assignment Conference
Assignment Background
This course is about design, specifcially object-oriented design. The course is not about introducing you to new or advanced features of the Java programming language and as such it is really not about Java programming. Granted you will be given opportunities to demonstrate your grasp of object-oriented design using the Java programming language but just writing a Java program that compiles and executes is only half of the grade. The other half is in your design, how you dcoument your design and how you design and implement your tests to prove to me and yourself your design is good.
The idea for this programming assignment came to me after reading exercises 5.12 and 5.13 on page 213 in the text.
Assignment Requirements
Design and implement a class library and a GUI based test application with the following minimal functionality:
Library minimum requirements:
- Design an interface named ICaseConverter that has two methods:
- String toCase(String stringToConvert) - the expectation is the input string would be a normal 'sentence' and the output would be the converted 'sentence'
- String fromCase(String stringToConvertBack, boolean toLowerCase) - the expectation is the input string is a converted 'sentence' and the output would be the original 'sentence' words but possible the capitalization changed based on the toLowerCase flag
- Design a class named PascalCaseConverter that implements the ICaseConverter interface:
- String toCase(String stringToConvert) - given 'convert this to pascal case' the output would be 'ConvertThisToPascalCase'
- String fromCase(String stringToConvertBack) - given 'ConvertThisToPascalCase' the output would be 'Convert This To Pascal Case' or 'convert this to pascal case',depending on the toLowerCase flag.
- Design a class named CamelCaseConverter that implements the ICaseConverter interface:
- String toCase(String stringToConvert) - given 'convert this to camel case' the output would be 'convertThisToCamelCase'
- String fromCase(String stringToConvertBack) - given 'convertThisToCamelCase' the output would be 'convert This To Camel Case' or 'convert this to camel case',depending on the toLowerCase flag.
- Design a class named SentenceConverter that implements the following methods:
- String convertToCase(String stringToConvert, ICaseConverter caseConverter) - converts the given sentence to the given case
- String convertFromCase(String stringToConvertBack, ICaseConverter caseConverter, boolean toLowerCase) - converts the given sentence from the given case using the toLowerCase flag.
GUI Tester minimum requirements:
- Design, implement and document a simple GUI based test application to test the SentenceConverter class. As a minimum you will need labeled controls (meaning a lable for each control explaining what the control's purpose) for:
- Input the 'sentence' to convert
- Choice of conversion class
- Choice of 'toLowerCase' boolean flag
- Buttons to convert and / or unconvert
- Output the converted 'sentence'
- Output the unconverted 'sentence'
Additional requirements:
- As part of your documentation, ensure you explain all the patterns and concepts you used in this assignment.
Minimum general design requirements:
- Demonstrate you have read and understand the concepts in Chapter 2 by documenting the your classes and interfaces using the CRC concept. Think this through,how do you expect your class or interface to be used and how have you implemented the class. Add this documentation to the class level Javadoc comment.
- Document the classes / interfaces and each method and variable using Javadoc style commenting. For each method, which is essentially your public interface, your documentation should include your interface analysis as described in section 3.5. Some attributes will of course be more involved than others but none the less you are to address each of them.
- Because I will be automating the testing of your assignments, it is imperative you follow the class naming that is prescribed.
- You will follow the Java naming conventions, i.e., class names are in Pascal case; methods and variables are in Camel case.
Reading Assignment | Assignment Requirements |
Assignment Turn-in | Assignment Conference
Turn-in Assignment
Instructions - individually post your answers to this assignment in the Assignments Section of the WebTycho classroom. To facilitate easier downloading and grading, please zip all programming and related files (*.java, *.html, etc) and any project files into one file and upload the zipped file using the naming convention lastname_lab#. For example, for this assignment the name would be snuffy_lab2.zip. Do not include any .class or .jar files as I will be compiling your source code as part of my testing.
Reading Assignment | Assignment Requirements |
Assignment Turn-in | Assignment Conference
Conference
I posted a new conference called Lab 2 and I would like you all to freely comment and ask questions pertaining to the chapters covered during this time frame and the assignment. There is a wide range of expertise in the class so here is your chance to learn from each other. Be considerate but do not be afraid to ask or offer an answer. I expect each of you to participate but this not a test but rather a classroom discussion.