Students' understanding of object-oriented (OO) program execution was studied by asking students to draw a picture of a program state at a specific moment. Students were given minimal instructions on what to inclu...
详细信息
Students' understanding of object-oriented (OO) program execution was studied by asking students to draw a picture of a program state at a specific moment. Students were given minimal instructions on what to include in their drawings in order to see what they considered to be central concepts and relationships in program execution. Three drawing tasks were given at different phases of an elementary OO programming course where two animation tools were used for program visualization. The drawings were analyzed for their overall approaches and their detailed *** was a large variability in the overall approaches and the popularity of various approaches changed during the course. The results indicate that students' mental representations of OO concepts and program execution not only grow as new material is covered in teaching, but they also change. The first drawings treat methods as having primarily a static existence; later methods are seen as dynamic invocations that call each other. The role of classes in program execution fluctuates during learning, indicating problems in locating the notion of class with respect to, for example, objects. Two major sources of problems that manifested in many different forms were the relationship between object and method, and the role of the main method with respect to program state. Other problems were caused by overly simplistic understanding of object identification and improper use of application domain knowledge.
Simulations offer an engaging way to learn about decomposition of complex systems. Here I describe a project where the goal is to build a simulation of an ant colony consisting of five different ant behaviors in a 2D ...
详细信息
ISBN:
(纸本)9781450318686
Simulations offer an engaging way to learn about decomposition of complex systems. Here I describe a project where the goal is to build a simulation of an ant colony consisting of five different ant behaviors in a 2D environment. Students design and build their simulations with no code provided except for the required GUI. Design issues include choice of appropriate data structures; traversal issues; and using inheritance to model ant behaviors. Students also learn about emergence, as characterized by the development of organized foraging trails by ants that respond only to their immediate surroundings. The visualization requirement enables students to quickly determine whether or not requirements have been met, and provides a way to rapidly grade a moderately large and complex assignment.
The well-known difficulties students exhibit when learning to program are often characterised as either difficulties in understanding the problem to be solved or difficulties in devising and coding a computational sol...
详细信息
ISBN:
(纸本)9781921770210
The well-known difficulties students exhibit when learning to program are often characterised as either difficulties in understanding the problem to be solved or difficulties in devising and coding a computational solution. It would therefore be helpful to understand which of these gives students the greatest trouble. Unit testing is a mainstay of large-scale software development and maintenance. A unit test suite serves not only for acceptance testing, but is also a form of requirements specification, as exemplified by agile programming methodologies in which the tests are developed before the corresponding program code. In order to better understand students' conceptual difficulties with programming, we conducted a series of experiments in which students were required to write both unit tests and program code for non-trivial problems. Their code and tests were then assessed separately for correctness and 'coverage', respectively. The results allowed us to directly compare students' abilities to characterise a computational problem, as a unit test suite, and develop a corresponding solution, as executable code. Since understanding a problem is a pre-requisite to solving it, we expected students' unit testing skills to be a strong predictor of their ability to successfully implement the corresponding program. Instead, however, we found that students' testing abilities lag well behind their coding skills.
We present pyOpt, an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable and portable manner. The framework uses object-oriented concepts, such a...
详细信息
We present pyOpt, an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable and portable manner. The framework uses object-oriented concepts, such as class inheritance and operator overloading, to maintain a distinct separation between the problem formulation and the optimization approach used to solve the problem. This creates a common interface in a flexible environment where both practitioners and developers alike can solve their optimization problems or develop and benchmark their own optimization algorithms. The framework is developed in the Python programming language, which allows for easy integration of optimization software programmed in Fortran, C, C+ +, and other languages. A variety of optimization algorithms are integrated in pyOpt and are accessible through the common interface. We solve a number of problems of increasing complexity to demonstrate how a given problem is formulated using this framework, and how the framework can be used to benchmark the various optimization algorithms.
Refactoring is recognized as an essential practice in the context of evolutionary and agile software development. Recognizing the importance of the practice, modern IDEs provide some support for low-level refactorings...
详细信息
Refactoring is recognized as an essential practice in the context of evolutionary and agile software development. Recognizing the importance of the practice, modern IDEs provide some support for low-level refactorings. A notable exception in the list of supported refactorings is the "Extract Class" refactoring. which is conceived to simplify large, complex, unwieldy and less cohesive classes. In this work, we describe a method and a tool, implemented as an Eclipse plugin, designed to fulfill exactly this need. Our method involves three steps: (a) recognition of Extract Class opportunities. (b) ranking of the identified opportunities in terms of the improvement each one is anticipated to bring about to the system design, and (c) fully automated application of the refactoring chosen by the developer. The first step relies on an agglomerative clustering algorithm, which identifies cohesive sets of class members within the system classes. The second step relies on the Entity Placement metric as a measure of design quality. Through a set of experiments we have shown that the tool is able to identify and extract new classes that developers recognize as "coherent concepts" and improve the design quality of the underlying system. (C) 2012 Elsevier Inc. All rights reserved.
This paper reports a scalar implementation of a multi-dimensional direct simulation Monte Carlo (DSMC) package named "Generalized Rarefied gAs Simulation Package" (GRASP). This implementation adopts a concep...
详细信息
This paper reports a scalar implementation of a multi-dimensional direct simulation Monte Carlo (DSMC) package named "Generalized Rarefied gAs Simulation Package" (GRASP). This implementation adopts a concept of simulation engine and it utilizes many object-oriented programming features and software engineering design patterns. As a result, this implementation successfully resolves the problem of program functionality and interface conflictions for multi-dimensional DSMC implementations. The package has an open architecture which benefits further development and code maintenance. To reduce engineering time for three-dimensional simulations, one effective implementation is to adopt a hybrid grid scheme with a flexible data structure, which can automatically treat cubic cells adjacent to object surfaces. This package can utilize traditional structured, unstructured or hybrid grids to model multi-dimensional complex geometries and simulate rarefied non-equilibrium gas flows. Benchmark test cases indicate that this implementation has satisfactory accuracy for complex rarefied gas flow simulations. Published by Elsevier Ltd.
Modern mobile devices are sufficiently powerful to execute computationally intensive mathematical problems. This study presents an implementation of a two-dimensional transmission line matrix method (TLM) solver execu...
详细信息
Modern mobile devices are sufficiently powerful to execute computationally intensive mathematical problems. This study presents an implementation of a two-dimensional transmission line matrix method (TLM) solver executing on a Smartphone. Software development and architectural design are discussed, focusing on object-oriented strategies for modular and reusable code. Optimisation strategies are also discussed, with large variations in performance observed dependent on the data-caching method that is used. Swapping between data buffers using pointers was shown to be the most effective method, offering significant performance gains over the original software. It was shown for a mesh measuring 246 by 370 nodes running on an iPhone 4 that an update rate of 9.37 fps could be achieved.
Surface reflectance adjusted for atmospheric effects is a primary input for land cover change detection and for developing many higher level surface geophysical parameters. With the development of automated atmospheri...
详细信息
Surface reflectance adjusted for atmospheric effects is a primary input for land cover change detection and for developing many higher level surface geophysical parameters. With the development of automated atmospheric correction algorithms, it is now feasible to produce large quantities of surface reflectance products using Landsat images. Validation of these products requires in situ measurements, which either do not exist or are difficult to obtain for most Landsat images. The surface reflectance products derived using data acquired by the Moderate Resolution Imaging Spectroradiometer (MOD'S), however, have been validated more comprehensively. Because the MODIS on the Terra platform and the Landsat 7 are only half an hour apart following the same orbit, and each of the 6 Landsat spectral bands overlaps with a MODIS band, good agreements between MODIS and Landsat surface reflectance values can be considered indicators of the reliability of the Landsat products, while disagreements may suggest potential quality problems that need to be further investigated. Here we develop a system called Landsat-MODIS Consistency Checking System (LMCCS). This system automatically matches Landsat data with MODIS observations acquired on the same date over the same locations and uses them to calculate a set of agreement metrics. To maximize its portability, Java and open-source libraries were used in developing this system, and object-oriented programming (OOP) principles were followed to make it more flexible for future expansion. As a highly automated system designed to run as a stand-alone package or as a component of other Landsat data processing systems, this system can be used to assess the quality of essentially every Landsat surface reflectance image where spatially and temporally matching MODIS data are available. The effectiveness of this system was demonstrated using it to assess preliminary surface reflectance products derived using the Global Land Survey (GLS) Landsat i
We present an object-oriented framework, named DOOLINES , for non-linear static and dynamic analyses of slender marine structures which often appear in offshore structures employed in the petroleum and gas industries ...
详细信息
We present an object-oriented framework, named DOOLINES , for non-linear static and dynamic analyses of slender marine structures which often appear in offshore structures employed in the petroleum and gas industries as, among others, flexible risers, steel catenary risers, umbilicals, floating hoses, and mooring lines. DOOLINES allows the rapid development of tailored, modular, reusable and extensible large-size systems, being itself extensible. These properties, along with the ease of use of our framework, are assessed by means of case studies. Code examples are provided.
At the conceptual design stage, simplified finite element (FE) model of body-in-white (BIW) structure focuses on its specific merit to provide early-stage predictions for detailed FE model of that. This paper exploits...
详细信息
At the conceptual design stage, simplified finite element (FE) model of body-in-white (BIW) structure focuses on its specific merit to provide early-stage predictions for detailed FE model of that. This paper exploits a semi-rigid beam element (SRBE) that consists of a beam element with two semi-rigid connections at the ends to simulate the flexibility of joint. Guyan reduction method condenses the SRBE as a super element. A special finite element software for structural modeling and analysis of BIW (SMAB) is developed in .NET framework. The Unified Modeling Language is employed to depict the classes and their relationship. The design patterns are identified and applied in the framework design to facilitate communication and system expansion. Microsoft DirectX and GDI+ implement graphics display of spatial BIW frame and planar thin-walled cross section. Based on multi-threaded technology in .NET, subspace iteration method is paralleled to speed up the mode analysis. As a result, the efficiency of the SRBE is demonstrated by a benchmarking automotive body. Multi-threaded parallel is effective and useful, especially for frequency optimization. (C) 2011 Elsevier Ltd. All rights reserved.
暂无评论