CIS 339 Week 7 Lab Object-Oriented Programming Language



Your demonstrations of how to create both method contract and the method specification for the GetCourseByCourseID() method of the CourseList class were very well received by your team members. They then asked you for one final demonstration of how to implement the method specification using an object-oriented (OO) programming language and see the method actually execute.
You realize that it is easy to implement the method specification in an OO programming language, but it is hard to test it because the rest of the application is not developed yet. You decided, therefore, to write two pieces of code:
Code that implements the GetCourseByCourseID() method
Code that implements a unit test for that method alone (outside of any other application code)
This way you can demonstrate the method implementation and also verify its correct behavior.
You are under a deadline constraint for this deliverable, so you asked some of your peer architects for help. They each are well versed in different OO languages like VB.NET, C#, and Java and they all have done unit testing before so they are familiar of how to construct one.
Your peer architects provided you with partially-completed shells for your demonstration. Each shell contains:
complete code for the Course class;
partially completed code for CourseList class; and
complete code for the CourseListTest class that unit tests the CourseList.GetCourseByCourseID() method.
Your task is now easy. Just select one of these shells and complete the code for the partially completed CourseList by coding it GetCourseByCourseID() method. When you compile and run the shell, it will automatically test your GetCourseByCourseID() code to ensure its correct behavior.
One Word file that contains the following:
A copy of the code you wrote for the GetCourseByCourseID method() of the CourseList class in your favorite OO programming language
A screen shot of the output of running the provided unit test in the shell (the CourseListTest class) showing that your code works as expected. Note that these unit tests only print out messages of testing problems. If your code is correct, the unit tests will succeed silently without any success messages.
An explanation of your work and the decisions you made to arrive at your proposed code
A zip file of the completed shell after you added your code so that the shell could be executed on a different machine
STEP 1: Review the Method Contract, Method Specification for the GetCDByCDID() Method, and Coding & Unit Testing GetCDByCDID() Method using Java (not Graded)
Download the Method Contract for GetCDByCDID() Method and review it prior to reviewing this week’s video tutorial.
Download the Method Specification for the GetCDByCDID() Method and review it prior to reviewing this week’s video tutorial
STEP 2: Code & Unit Test the GetCourseByCourseID() method of the CourseList class
Decide on your OOP programming language that you will use for this lab and then download the corresponding shell from the following:
Visual Basic Shell
C# Shell
Java Shell
Both the Visual Basic and C# shells are Visual Studio projects while the Java shell include only the *.java source files that could be loaded into any Java IDE.
Code and unit test the CourseList.GetCourseByCourseID() method in your favorite programming language. You only need to add code for the GetCourseByCourseID() method and then run the application (the unit test will automatically test your code), then print out problem messages, if any
Explain your work and the decisions you made to arrive at your proposed solution.
STEP 3: Submit your assignment
Copy and paste into a Word document:
your code for the GetCourseByCourseID() method;
a screen shot of running your unit test; and
your explanation of your work and the decisions you made to arrive at your code.
Save your document with the file name CIS339_Lab7_YourName.
Then, zip all the lab file into one zip file so that the entire project would run on a different machine.
Save your zip file with the file name
The solution includes a single zip file.
Attachments [Move over files to preview content of those files] (71.87 KB)
Preview Course.cs
xxxxx xxxxxx
xxxxxx xxxxxx(xxxxxx xx, xxxxxx xxxxx, xxx xxxxxxxxxxx, xxxxxx xxxxxxxxxxx, xxxxxx xxxxxxxxxxxxxxxxxx)
xxxx.xxxxxxxx = xx;
this.CourseTitle = title; this.CreditHours = creditHours; this.Description = description; this.PrerequisiteCourse = prerequisiteCourse; }
public string CourseID;
xxxxxx xxxxxx xxxxxxxxxxx;
xxxxxx xxx xxxxxxxxxxx;
xxxxxx xxxxxx xxxxxxxxxxx;
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxx;
Preview CourseList.cs
xxxxx xxxxxxxxxx
xxxxxx xxxxxx[] xxxxxxxxxxx =
xxx xxxxxx (“xxx 400”, “xx xxxxxxxx & xxxxxx”, 4, “xxxxxxxxx xxxxx”, “xxx 110”) ,
new Course (“CIS 150A” , “VB.NET Programming”, 4, “Good Introduction to programming”, “CIS 100”) , new Course (“CIS 150B”, “C# Programming with labs”, 4, “Follow-up to CIS 100”, “CIS 100”) };
public Course GetCourseByCourseID(string id) { foreach (Course _course in CourseArray)
//xxxxxxxx xxxx xxxxxxxx xxxx xxx xx xxxxxx xx xxxxxxxxx,
//xx xxxxxx xx xxxxxxx xxxx xxxxxx xxx xxxxxx xxxxxx
xx (_xxxxxx.xxxxxxxx.xxxxxxx().xxxx() == xx.xxxxxxx().xxxx())
xxxxxx _xxxxxx;
Preview CourseListTest.cs
xxxxx xxxxxxxxxxxxxx
xxxxxx xxxxxx xxxx xxxx(xxxxxx[] xxxx)
GetCourseByCourseIDTestWhenCourseDoesNotExist(); }
public static void GetCourseByCourseIDTestWhenCourseExists() {
CourseList myCourseList = new CourseList();
xxxxxx xxxxxxxx = xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx(“xxx 400”);
xx (xxxxxxxx.xxxxxxxx != “xxx 400”)
xxxxxx.xxxxxxx.xxxxxxxxx(“xxxxx – xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(): xxxxxxxx xxxxxxxx xxx xxxxx (xxx 400)”);
xxxxxx xxxxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx()
Preview CS-CourseListTest.csproj.FileListAbsolute.txt
x:xxxxxxxxxx x. xxxxxxxxxxxxxxxxxxxxxxxxxx
x:xxxxxxxxxx x. xxxxxxxxxxxxxxxxxxxxxxxxxx
x:xxxxxxxxxx x. xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx-xxxxxxxxxxxxxxxxxx86xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxx
x:xxxxxxxxxx x. xxxxxxxxxxxxxxxxxxxxxxxxxx
x:xxxxxxxxxx x. xxxxxxxxxxxxxxxxxxxxxxxxxx
C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesCS-CourseListTestCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.exe C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesCS-CourseListTestCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.pdb C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesCS-CourseListTest-ShellCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.exe C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesCS-CourseListTest-ShellCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.pdb C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesCS-CourseListTest-ShellCS-CourseListTestCS-CourseListTestobjx86ReleaseResolveAssemblyReference.cache C:Online Classes2 DeVry CoursesDev2011CIS 339 – Take 2MeDelivery Week7 ContentPracticesWeek7 iLab ShellsCS-CourseListTest-ShellCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.exe D:PersonalFLCIS339HelpCS-CourseListTest-ShellCS-CourseListTest-ShellCS-CourseListTestCS-CourseListTestobjx86ReleaseCS-CourseListTest.exe
Price: $12
Buy Now
Added to cart
Add to Cart
Added to cart
Save $19
CIS 339 Entire Course
Get Entire Course
You May Also Like:
CIS 339 Week 1 Lab System Request
CIS 339 Week 2 Lab Use Case Diagram and Use Case Description
CIS 339 Week 3 Lab Class Diagram and CRC Cards
CIS 339 Week 4 Lab Behavioral Model and Diagrams
CIS 339 Week 5 Lab Package Diagram
CIS 339 Week 6 Lab CRCs Contracts and Method Specifications


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.