= JCop Sample Programs = This site describes some [wiki:JCop] sample programs and provides download links. == Adressbook == {{{ #!div class="wiki_infotable" style="float:right;" ||'''Environment'''|| || || [[Image(media/icons/silk:application_home.png, title="Recommended Java VM Version", nolink, right)]] || JVM 1.5 || || [[Image(media/icons/silk:package.png, title="Recommended JCop Version", nolink, right)]] || [wiki:JCop] || ||'''Downloads'''|| || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/JCopSampleProgramms/AdressBook/JCop_example_AdressBook.zip zip archive] || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/JCopSampleProgramms/AdressBook/src browse sourcecode] || }}} A simple COP example. An adressbook contains persons. By default, a person's name will be returned by the {{{toString}}} method.[[BR]] Depending on context information, persons can also reveal their address. Data will be either rendered as plain string, with Wiki syntax, or in HTML format. [[BR]] [[BR]] [[BR]] Author: [https://www.hpi.uni-potsdam.de/hirschfeld/people/appeltauer/index.html Malte Appeltauer] == Bank Transfer System == {{{ #!div class="wiki_infotable" style="float:right;" ||'''Environment'''|| || || [[Image(media/icons/silk:application_home.png, title="Recommended Java VM Version", nolink, right)]] || JVM 1.5 || || [[Image(media/icons/silk:package.png, title="Recommended JCop Version", nolink, right)]] || [wiki:JCop] || ||'''Downloads'''|| || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/JCopSampleProgramms/TransferSystem/JCop_example_TransferSystem.zip zip archive] || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/JCopSampleProgramms/TransferSystem/src browse sourcecode] || }}} ... [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] Author: [https://www.hpi.uni-potsdam.de/hirschfeld/people/appeltauer/index.html Malte Appeltauer] == Body Mass Index Calculator == {{{ #!div class="wiki_infotable" style="float:right;" ||'''Environment'''|| || || [[Image(media/icons/silk:application_home.png, title="Recommended Java VM Version", nolink, right)]] || JVM 1.5 || || [[Image(media/icons/silk:package.png, title="Recommended JCop Version", nolink, right)]] || [wiki:JCop] || || [[Image(media/icons/silk:disk.png, title="Qt Jambi Version", nolink, right)]] ||[http://qtjambi.sourceforge.net/ ''Qt Jambi''][[BR]]^Example includes win32/64 versions.^|| ||'''Downloads'''|| || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/JCopSampleProgramms/BodyMassIndexCalculator browse sourcecode] || }}} The calculator was developed with JCop and Qt Jambi in a university seminar about several SoC programming paradigms including context-oriented programming. The small application provides the possibility to explicitly manipulate the user's context. It uses JCop's declarative layer activation to refine base methods according to the user's context. A user can be from Germany or the U.S. and therefore expectation of the metric system (pound vs. kilograms, feet vs. meters) are used in BMI value calculation. Also visualization of the actual BMI result is provided according to the user's need. Author: Lauritz Thamsen == Mobile Community Application Simulation == {{{ #!div class="wiki_infotable" style="float:right;" [[Image(mobile_community_screenshot.jpg, 235px, right)]] ||'''Environment'''|| || || [[Image(media/icons/silk:application_home.png, title="Recommended Java VM Version", nolink, right)]] || JVM 1.5 || || [[Image(media/icons/silk:package.png, title="Recommended JCop Version", nolink, right)]] || [wiki:JCop] || ||'''Downloads'''|| || || [[Image(media/icons/silk:disk.png, title="downloads", nolink, right)]] || [https://www.hpi.uni-potsdam.de/hirschfeld/svn/cop/JCopProject/src/MobileClientDemo/workspace/MobileClient browse sourcecode] || }}} Mobile community applications allow users to share information about their mood, activities, location, and more. This application focuses on the location representation of buddies on mobile devices for scenarios like the following. Two students, Lucy and Tim have an appointment at University at 12:00. * At 11:50, Lucy arrives at the campus. She checks her mobile device to inform herself about Tim’s current whereabout. The graphical representation of this information depends on Lucy’s context: If Lucy’s device is currently connected to the Internet at high-bandwidth, a map image service is requested to render Tim’s location on a map. Contrary, if the bandwidth is low, Tim’s representation depends on Lucy’s need for active information. This information is stored in Lucy’s user profile and is accessible for applications. In the case that Lucy prefers a smart representation over the refresh period, a map with Tim’s outdated location is shown. The map is labeled with the time stamp of the last update. Alternatively, when Lucy insists on up-to-date information, while the bandwidth is too low for updating the map image, Tim’s position data is simply shown as a text. * At the same time, Tim arrives at the underground station, where his GPS device is unable to receive data and more. Thus, his mobile device switches to cell-based location detection. The new location data is calculated based on the position of the current mobile cell. The change of the location provider is propagated to Lucy’s device. Depending on its current context, the device has to decide how it renders this additional location information. The application allows to navigate Lucy's and Tim's cellphones over a map of Berlin. Changes to the rendering of the cellphone displays are implemented by layers. Author: [https://www.hpi.uni-potsdam.de/hirschfeld/people/appeltauer/index.html Malte Appeltauer] [[BR]] ----