New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Advanced Software Engineering

by: Melvin Bednar

Advanced Software Engineering CSI 5V93

Marketplace > Baylor University > ComputerScienence > CSI 5V93 > Advanced Software Engineering
Melvin Bednar
Baylor University
GPA 3.85


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 9 page Class Notes was uploaded by Melvin Bednar on Saturday October 3, 2015. The Class Notes belongs to CSI 5V93 at Baylor University taught by Staff in Fall. Since its upload, it has received 12 views. For similar materials see /class/217937/csi-5v93-baylor-university in ComputerScienence at Baylor University.

Similar to CSI 5V93 at Baylor University

Popular in ComputerScienence


Reviews for Advanced Software Engineering


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/03/15
Singleton Set package patternl x ltpgtTitlez Patternlltpgt ltpgtDescriptionz ltpgt ltpgtCopyrightz Copyright c 2002ltpgt ltpgtCompanyz ltpgt author Paul Grabow Version 10 public class myClass public myClass0 public static void mainString argm myClass myClassl new myClass Note each Singleton is not declared normally ie using a constructor Singleton mine Singletoninstance Singleton yours mineinstance Group bears new Group quotbearsquot Group ponies new Group quotponiesquot Group elk new Group quotelk39 GroupSet mySet minegetGroupSet GroupSet yourSet yoursgetGroupSet mySetadd bears yourSetadd ponies SystemoutprintlnquotMinez quot mySettoString SystemoutprintlnquotYoursz quot yourSettoString package patternl public class Singleton The Singleton pattern makes sure that the GroupSet is instantiated only once protected GroupSet miset A handle to the unique Singleton instance k static private Singleton iinstance null 10f9 Singleton Set Cannot call this directly because it is not public private Singleton miset new GroupSet return The unique instance of this class static public Singleton instance ifnul iinstance iinstance new Singleton return iinstance return GroupSet k public GroupSet getGroupSet return miset package patternl import javautil k ltpgtDescriptionz Set of group objectsltpgt ltpgtCoursez CSI 5V93 Software Engineeringltpgt ltpgtProjectz configuration managementltpgt author P Grabow Version 452003 at 1100 am public class GroupSet implements javaioSerializable TreeSet theSet public GroupSetU theSet new TreeSet kk Add only non null objects param aGroup return public boolean add Group aGroup 20f9 Singleton Set if aGroup is quotnullquot then do nothing otherwise add aGroup to theSet if laGroupisNull return theSetaddaGroup else return false Remove all elements from the set A public void clear0 theSetclear kk Is the set empty return k public boolean isEmpty return theSetisEmpty kk Remove the object from the set param aGroup return k public boolean remove Group aGroup return theSetremoveaGroup Is the object in the set param aGroup return k public boolean isln Group aGroup return theSetcontainsaGroup k k Number of unique elements in the set return public int size return theSetsize kk String representation of the set 30f9 Singleton Set return k public String toString return theSettoString return k public Iterator iterator0 return theSetiterator ltpgtReturn entire object based on key only object Null value returned if not in the set ltpgt param aGroup return public Group get Group aGroup Iterator i 7 iterator Group temp new Group while ihasNext temp Groupinext iftempequals aGroup return temp return new Group k k ltpgtReplace the quotold objectquot with the quotnew objectquot based on matching keys ltpgt param aGroup return public boolean replace Group aGroup remove aGroup return addaGroup package patternl ltpgtDescriptionz Those who control a configurationltpgt ltpgtCoursez CSI 5V93 Software Engineeringltpgt ltpgtProjectz configuration managementltpgt author P Grabow 40f9 Singleton Set Version 452003 at 1100 am public class Group implements Comparable javaioSerializable primary key attributes protected String miname non key attributes k k public Group nLname CommonNULL7STRING kk k param aName k public Group String aName if isValidName aName miname CommonnormalizeaName else miname CommonNULL7STRING Extractors kk k return public String getName return miname Utilities k k return public boolean isNull0 return miname CommonNULL7STRING 50f9 Singleton Set k return string representation of primary key public String toStringU return StringvalueOfm7nameL public String toAllStringU return toString isValid functions param aName return public boolean isValidName String aName to be done return CommonnormalizeaNamelength gt0 Relational operators kk k param aGroup return public boolean isEqual Group aGroup i return compareToaGroup e 0 kk k param aGroup return public boolean isLess Group aGroup return compareToaGroup lt 0 param aGroup return k public boolean isGreater Group aGroup return compareToaGroup gt 0 60f9 Singleton Set kk k param anObj ect return public int compareToObject anObject Group aGroup GroupanObject int temp minamecompareTolgnoreCase return temp aGroupm7nameL package patternl ltpgtDescriptionz Common declarationsltpgt ltpgtCoursez CSI 5V93 Software Engineeringltpgt ltpgtProjectz configuration managementltpgt author P Grabow Version 452003 at 1100 am public class Common static 39 U static static static static static static static static static public final public final public final public final public final public final public final public final public final public final String NULLisTRlNG int NULLilD NULLiACCOUNT NULLisTRlNG 7 NULLSTRING NULLicATEGORY NULLiSTRING static public final String NULLiDESCRIPTION NULLisTRlNG final final final final final final final final static 1 static static static static static static static public public public public public public public public long long long long long long long A long MINDATE MIN MONTH NULLiDATE MlNiMONTH MINiYEARlOOOO 7 100 MlNiDAY long MAX DATE MAX YEARlOOOO MAX7MONTH l O O 7MAX7DAY final static public 7 final final final final static static static static public public public public long NULLiPATRONilD long NULLACOPYiNUMBER long MlNicoPYiNUMBER long MAXicoPYiNUMBER static public final String NULLilSBN NULLiSTRING 70f9 80f9 Singleton Set static public final String NULLiPHONE NULLiSTRING static public final String NULLiTITLE 7 NULLiSTRING static public final String NULLiPUBLISHER NULLiSTRING lsValid functions kk Remove leading and trailing blanks param aString return boolean static public String normalize String aString String temp aStringtrim return temp kk ltPgtValidz no leadingtrailing blanks embedded digitsltPgt param aString return boolean k no embedded blanks and no static public boolean isValidName String aString PRE No leading or trailing blanks POST no digits or embedded blanks boolean result if true aStringlength lt 1 result false else Check for embedded blanks int positionOfBlank aStringindexOf39 if positionOfBlank 39 1 result false else Check for digits int positionOfDigit l for int i39O39 ilt39939 i positionOfDigit aStringindexOfiL if positionOfDigit it result false return result Singleton Set k k k param aMonth param aDay return static public boolean isValidDay int aMonth int aDay ifaDay lt CommonMlN7DAY ll aDay gt CommonMAX7DAY ll aMonth lt CommonMlN MONTH ll aMonth gt CommonMAX MONTH return false 7 7 else switch aMonth case 1 case 3 case 7 case 8 case 10 case 12 return aDay lt 31 case 5 case 4 case 6 case 9 case 11 return aDay lt 30 case 2 return aDay lt 29 default return false param aYear return static public boolean isValidYear int aYear return aYear gt CommonMlN7YEAR ampamp aYear lt CommonMAX7YEARL param aMonth param aDay param aYear return k static public long makeDate int aMonth int aDay int aYear if isValidYearaYear ampamp isValidDay aMonth aDay H return aYearlOOOO aMonthlOO aDay else return CommonNULL7DATE 90f9


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Anthony Lee UC Santa Barbara

"I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.