Java

Thursday Extra: "Enhancing Myro Java using Android"

On Thursday, April 17, Nora Bresette Buccino will discuss the development of an application programming interface for small robots in Java, with extensions to the Android environment:

The use of personal robots in computing is becoming more ubiquitous as robots are a good way to attract students and introduce them to the subject of computer science. Therefore, it is important to make use of all the features of the robots to give users a sense of the capabilities provided by robotics. The API (Application Programming Interface) defined by the Institute for Personal Robots in Education, called Myro, originally created in Python, has now been adapted to many other popular programming languages including Java. The Myro Java API created for the Scribbler robots by Professor Douglas Harms of DePauw University included most of the features of Myro Python. Our goals in this project were to add features to the Myro Java API, to enhance the user's capabilities, and to attempt to incorporate Android development into Myro Java.

Smart phones and tablets have become an integral part of the way we communicate and learn. Not only can these devices be used to communicate with other people, but they can also communicate with other devices through Bluetooth and infrared sensors. Thus these types of devices can interact with devices such as robots and applications can be created to control these robots. Therefore, we decided to integrate Myro and Android to provide the opportunity to not only learn about robotics but to also learn about Android programming and mobile application development.

At 4:15 p.m., refreshments will be served in the Computer Science Commons. The talk, “Enhancing Myro Java using Android,” will begin at 4:30 p.m. in Noyce 3821. Everyone is welcome to attend!

Computer Science Table (Friday, April 11, 2014): Lambda expressions in Java 8

As you may have heard, one of the new features of Java 8 is the introduction of anonymous functions (which everyone calls “lambda expressions,” even though there's no lambda in the syntax). This Friday at CS Table, we will explore Java 8's anonymous functions. Here are a few readings you might read or skim in advance of the discussion:

Horstmann, Cay S. “Lambda expressions in Java 8.” Dr Dobb's journal, March 25, 2014.

Weiss, Tal. “The dark side of lambda expressions in Java 8.” The Takipi blog, March 25, 2014.

You may also want to explore the formal tutorial on lambdas:

Oracle. “Lambda expressions.” The Java tutorials, 2014.

Computer Science Table is an open weekly meeting of Grinnell College community members (students, faculty, staff, etc.) interested in discussing topics related to computing and computer science.

CSC 207 - Object-Oriented Problem Solving and Algorithms

CSC 151, CSC 161, and CSC 207 — the three courses in Grinnell's multi-paradigm, introductory computer science sequence — have been recognized as "exemplar courses" by the ACM/IEEE-CS Task Force on Computing Curricula 2013.

Overview

CSC 207 is the third course in Grinnell's introductory computer science sequence and serves as the core gateway course to the majors. Students develop and analyze core data types (lists, stacks, queues, heaps, trees) and algorithms (primarily sorting and searching). Students also develop facility with object-oriented design. We use the Java programming language.

Starting in Fall 2013, CSC 207 has an experimental theme of Computing for Social Good. Students will work with free and open source projects that relate to the primary content of the course. We will leverage the Android platform for some of this development.

Catalog Description

An introduction to the ideas and practices of computation: message passing, information hiding, classes and interfaces, inheritance, polymorphism, and reflection. The course also includes data structures and the associated algorithms, packages and libraries, exceptions, and the use of an integrated software-development environment. Includes formal laboratory work.

Syllabus Description

Coming Soon

Class Format and Pedagogy

Coming Soon

Current and Past Course Offerings

The department maintains a page of current and past course offerings.

Student Learning Outcomes

Computer Science Curricula 2013 (CS2013), national curricular recommendations from the ACM/IEEE-CS professional societies, identify an extensive list of learning outcomes for undergraduate computer science programs. Upon completing CSC 161, students should achieve the following learning outcomes with the specified level of mastery:

Knowledge UnitLearning Outcome with [Level of Mastery]
Basic Analysis
  • Explain what is meant by “best”, “average”, and “worst” case behavior of an algorithm. [Familiarity]
  • In the context of specific algorithms, identify the characteristics of data and/or other conditions or assumptions that lead to different behaviors. [Assessment]
  • Determine informally the time and space complexity of simple algorithms. [Usage]
  • Understand the formal definition of big O. [Familiarity]
  • List and contrast standard complexity classes. [Familiarity]
  • Perform empirical studies to validate hypotheses about runtime stemming from mathematical analysis. Run algorithms on input of various sizes and compare performance. [Assessment]
  • Give examples that illustrate time-space trade-offs of algorithms. [Familiarity]
  • Use big O notation formally to give asymptotic upper bounds on time and space complexity of algorithms. [Usage]
  • Use big O notation formally to give expected case bounds on time complexity of algorithms. [Usage]
  • Explain the use of big omega, big theta, and little o notation to describe the amount of work done by an algorithm. [Familiarity]
Algorithmic Strategies
  • For each of the above strategies (brute force, greedy, divide and conquer, backtracking, dynamic), identify a practical example to which it would apply. [Familiarity]
  • Have facility mapping pseudocode to implementation, implementing examples of algorithmic strategies from scratch, and applying them to specific problems. [Usage]
  • Use a divide-and-conquer algorithm to solve an appropriate problem. [Usage]
Fundamental Data Structures and Algorithms
  • Implement simple search algorithms and explain the differences in their time complexities. [Usage, Assessment]
  • Be able to implement common quadratic and O(N log N) sorting algorithms. [Usage]
  • Understand the implementation of hash tables, including collision avoidance and resolution. [Familiarity]
  • Discuss the runtime and memory efficiency of principal algorithms for sorting, searching, and hashing. [Familiarity]
  • Discuss factors other than computational efficiency that influence the choice of algorithms, such as programming time, maintainability, and the use of application-specific patterns in the input data. [Familiarity]
  • Demonstrate the ability to evaluate algorithms, to select from a range of possible options, to provide justification for that selection, and to implement the algorithm in a particular context. [Usage, Assessment]
  • Understand the heap property and the use of heaps as an implementation of priority queues. [Familiarity]
Advanced Data Structures Algorithms and Analysis
  • Understand the mapping of real-world problems to algorithmic solutions (e.g., as graph problems, linear programs, etc.) [Usage, Assessment]
  • Apply advanced analysis techniques (e.g., amortized, probabilistic, etc.) to algorithms. [Familiarity]
Fundamentals
  • Explain the concept of modeling and the use of abstraction that allows the use of a machine to solve a problem. [Familiarity]
  • Describe the relationship between modeling and simulation, i.e., thinking of simulation as dynamic modeling.[Familiarity]
  • Create a simple, formal mathematical model of a real-world situation and use that model in a simulation. [Familiarity]
  • Describe several approaches to validating models. [Familiarity]
Processing
  • Analyze simple problem statements to identify relevant information and select appropriate processing to solve the problem. [Assessment]
  • Identify the issues impacting correctness and efficiency of a computation. [Familiarity]
Graphs and Trees
  • Demonstrate different traversal methods for trees and graphs, including pre, post, and in-order traversal of trees. [Trees]
  • Model a variety of real-world problems in computer science using appropriate forms of graphs and trees, such as representing a network topology or the organizaiton of a hierarchical file system. [Trees]
Defensive Programming
  • Explain why you might choose to develop a program in a type-safe language like Java, in contrast to an unsafe programming language like C/C++. [Some Familiarity]
  • Demonstrate the identification and graceful handling of error conditions. [Usage]
  • Use static and dynamic tools to identify programming faults. [Usage]
Data Modeling
  • Describe the main concepts of the OO model such as object identity, type constructors, encapsulation, inheritance, polymorphism, and versioning. [Familiarity]
Object-Oriented Programming
  • Compare and contrast (1) the procedural/functional approach—defining a function for each operation with the function body providing a case for each data variant—and (2) the object-oriented approach—defining a class for each data variant with the class definition providing a method for each operation. Understand both as defining a matrix of operations and variants. [Assessment]
  • Use subclassing to design simple class hierarchies that allow code to be reused for distinct subclasses. [Usage]
  • Correctly reason about control flow in a program using dynamic dispatch. [Usage]
  • Use multiple encapsulation mechanisms, such as function closures, object-oriented interfaces, and support for abstract datatypes, in multiple programming languages. [Usage]
  • Define and use iterators and other operations on aggregates using idioms most natural in multiple programming languages, including taking functions as arguments. [Usage]
  • Explain the relationship between object-oriented inheritance (code-sharing and overriding) and subtyping (the idea of a subtype being usable in a context that expects the supertype). [Familiarity]
Functional Programming
  • Use multiple encapsulation mechanisms, such as function closures, object-oriented interfaces, and support for abstract datatypes, in multiple programming languages. [Usage]
Basic Type Systems
  • For multiple programming languages, identify program properties checked statically and program properties checked dynamically. Use this knowledge when writing and debugging programs. [Usage]
  • Define and use program pieces (such as functions, classes, methods) that use generic types. [Usage]
  • Explain benefits and limitations of static typing. [Familiarity]
Advanced Programming Constructs
  • Use various advanced programming constructs and idioms correctly. [Usage]
  • Discuss how various advanced programming constructs aim to improve program structure, software quality, and programmer productivity. [Familiarity]
  • Discuss how various advanced programming constructs interact with the definition and implementation of other language features. [Familiarity]
Algorithms and Design
  • Determine whether a recursive or iterative solution is most appropriate for a problem. [Assessment]
  • Apply the techniques of decomposition to break a program into smaller pieces. [Usage]
  • Identify the data components and behaviors of multiple abstract data types. [Usage]
  • Implement a coherent abstract data type, with loose coupling between components and behaviors. [Usage]
  • Identify the relative strengths and weaknesses among multiple designs or implementations for a problem. [Assessment]
Fundamental Programming Concepts
  • Analyze and explain the behavior of simple programs involving the fundamental programming constructs covered by this unit. [Assessment]
  • Identify and describe uses of primitive data types. [Familiarity]
  • Write programs that use primitive data types. [Usage]
  • Modify and expand short programs that use standard conditional and iterative control structures and functions. [Usage]
  • Design, implement, test, and debug a program that uses each of the following fundamental programming constructs: basic computation, simple I/O, standard conditional and iterative structures, the definition of functions, and parameter passing. [Usage]
  • Choose appropriate conditional and iteration constructs for a given programming task. [Assessment]
  • Describe the concept of recursion and give examples of its use. [Familiarity]
  • Identify the base case and the general case of a recursively-defined problem. [Assessment]
Fundamental Data Structures
  • Discuss the appropriate use of built-in data structures. [Familiarity]
  • Describe common applications for each data structure in the topic list. [Familiarity]
  • Write programs that use each of the following data structures: arrays, strings, linked lists, stacks, queues, sets, and maps. [Usage]
  • Compare alternative implementations of data structures with respect to performance. [Assessment]
  • Compare and contrast the costs and benefits of dynamic and static data structure implementations. [Assessment]
  • Choose the appropriate data structure for modeling a given problem. [Assessment]
Development Methods
  • Trace the execution of a variety of code segments and write summaries of their computations. [Assessment]
  • Explain why the creation of correct program components is important in the production of high-quality software. [Familiarity]
  • Identify common coding errors that lead to insecure programs (e.g., buffer overflows, memory leaks, malicious code) and apply strategies for avoiding such errors. [Usage]
  • Conduct a personal code review (focused on common coding errors) on a program component using a provided checklist. [Usage]
  • Contribute to a small-team code review focused on component correctness. [Usage]
  • Describe how a contract can be used to specify the behavior of a program component. [Familiarity]
  • Create a unit test plan for a medium-size code segment. [Usage]
  • Refactor a program by identifying opportunities to apply procedural abstraction. [Usage]
  • Apply a variety of strategies to the testing and debugging of simple programs. [Usage]
  • Construct, execute and debug programs using a modern IDE and associated tools such as unit testing tools and visual debuggers. [Usage]
  • Construct and debug programs using the standard libraries available with a chosen programming language. [Usage]
  • Analyze the extent to which another programmer’s code meets documentation and programming style standards. [Assessment]
  • Apply consistent documentation and program style standards that contribute to the readability and maintainability of software. [Usage]
Requirement Engineering
  • Interpret a given requirements model for a simple software system. [Familiarity]
  • Conduct a review of a set of software requirements to determine the quality of the requirements with respect to the characteristics of good requirements. [Usage]
Software Design
  • Articulate design principles including separation of concerns, information hiding, coupling and cohesion, and encapsulation. [Familiarity]
  • Use a design paradigm to design a simple software system, and explain how system design principles have been applied in this design. [Usage]
  • Construct models of the design of a simple software system that are appropriate for the paradigm used to design it. [Usasge]
  • Design a contract for a typical small software component for use in a given system. [Usage]
Software Construction
  • Build robust code using exception handling mechanisms. [Usage]
Software Verification Validation
  • Describe the role that tools can play in the validation of software. [Familiarity]
  • Discuss the issues involving the testing of object-oriented software. [Usage]
Cross-Layer Communications
  • Find bugs in a layered program by using tools for program tracing, single stepping, and debugging. [Assessment]
Social Context
  • Describe positive and negative ways in which computer technology (networks, mobile computing, cloud computing) alters modes of social interaction at the personal level. [Familiarity]
Professional Ethics
  • Identify ethical issues that arise in software development and determine how to address them technically and ethically. [Familiarity]
  • Recognize the ethical responsibility of ensuring software correctness, reliability and safety. [Familiarity]
  • Describe the strengths and weaknesses of relevant professional codes as expressions of professionalism and guides to decision-making. [??]
Professional Communication
  • Write clear, concise, and accurate technical documents following well-defined standards for format and for including appropriate tables, figures, and references. [Usage]
  • Evaluate written technical documentation to detect problems of various kinds. [Assessment]

Introductory courses

Introductory Course CSC 151

Multi-paradigm Approach for Introductory Courses

Computing has become widespread in today's society, largely because it helps people solve problems. However, different types of problems require fundamentally different approaches for problem solving. Computer science recognizes at least four problem-solving approaches as being fundamental to work in the discipline. Each approach involves a distinct way of thinking, and each is supported by a range of computer languages.

Grinnell's computer science curriculum explores several of these paradigms in the beginning courses, each of which has been named a "course exemplar" by the international professional computing societies.

  • CSC 151, Functional Problem Solving
    • emphasizes functional problem solving
    • supported by the Scheme programming language (a dialect of LISP, a language widely used for artificial intelligence, graphical manipulations, and other applications)
    • application area: image processing / media scripting
151 image, Kent, Re-Scherer 151 image, Tsui, Miller 161 image, Mai Ha Vu 151 image, Philipp, Reischmann, Cantley
CSC 151 image by James Kent and Chris Re-Scherer, Fall 2012 CSC 151 image by Amy Tsui and Solomon Miller, Spring 2010 CSC 161 image by Mai Ha Vu, Fall 2012 CSC 151 image by Grace Philipp, Elizabeth Reischmann, and Lauren Cantley, Fall 2009
  • CSC 161, Imperative Problem Solving and Data Structures
    • studies concepts tied to the architecture of computers, compilers, and operating systems within the context of the imperative problem-solving paradigm
    • supported by the C (a programming language widely used in scientific applications and engineering)
    • application area: control of robots
Scribbler 2 robot
(front view)
Scribbler 2 Front Scribbler 2 Back Scribbler 2 robot
(rear view)
  • CSC 207, Algorithms and Object-Oriented Design
    • explores object-oriented problem solving
    • supported by the Java programming language (a language widely use for large-scale applications and systems)
    • application area: software development for the common good

Introductory Course CSC 151

Students with considerable background should consult the computer science faculty regarding placement.

  • Students with strong scores on the AP CS A examination or the IB CS examination receive credit for their prior work, but placement requires discussion of their specific background.
  • Most incoming students find functional problem solving to be quite new and different, so they begin with CSC 151 (where no computing background is assumed).
  • Students with substantial experience in imperative problem solving or object-oriented problem solving (e.g., students with AP CS A or IB CS background) may be able to skip CSC 161 or CSC 207, depending upon the extent of their background.

Later courses build on this foundation to provide depth in each of these problem-solving paradigms and programming languages.


Syndicate content