Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
A behaviour driven example of writing a Java program

A new exercise example just posted from the Java course I'm running this week - contionals, loops, and a few static functions.

The question is to rea from the user how many tables there are in a restaurant, then read the width and length of each table and report on the number of people who can be seated at each table as it's added in, and to keep a cumulative total for the restaruant as a whole.

I provided a sample of what I wanted the results to look like as my specification - "Behaviour Driven Developement" in its simplest form if you would like to thing of it like that. Full source [here]
(written 2014-12-09)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q456 - Object Orientation and General technical topics - Test Driven Development and Behaviour Driven Development
  [4326] Learning to program - comments, documentation and test code - (2014-11-22)
  [4336] Test Driven Development - a first example of principle in C - (2014-12-01)
  [4374] Test driven development, and class design, from first principles (using C++) - (2014-12-30)
  [4380] Behaviour Driven Development / Ruby and Cucumber - (2015-01-02)
  [4387] Regression Testing my website - Cucumber and Watir - (2015-01-07)
  [4457] Test framework for TCL - Tcltest - some examples - (2015-03-11)
  [4542] The principle of mocking - and the Python Mock package - (2015-10-17)
  [4634] Regression testing - via a very short C testing framework - (2016-01-29)
  [4652] Testing new algorithms in PHP - (2016-02-20)

J704 - Java - Loops and Conditional Statements
  [353] Wimbledon Neck - (2005-06-20)
  [1220] for loop - how it works (Perl, PHP, Java, C, etc) - (2007-06-06)
  [1582] Ruby, C, Java and more - getting out of loops - (2008-03-19)
  [1696] Saying NOT in Perl, PHP, Python, Lua ... - (2008-07-04)
  [2734] for and foreach in Java - (2010-04-22)
  [3038] Setting up individual variables, and arrays, in Java - some commented examples - (2010-11-09)
  [3200] How a for loop works Java, Perl and other languages - (2011-03-12)
  [3397] Does a for loop evaluate its end condition once, or on every iteration? - (2011-08-18)
  [4322] Learning to Program - the conditional statement (if) - (2014-11-21)
  [4323] Learning to program - Loop statements such as while - (2014-11-22)
  [4427] Java example - for loop and conditionals from course exercise - (2015-02-16)


Back to
Incrementing a variable in Java - Pre and Post Increment
Previous and next
or
Horse's mouth home
Forward to
Arrays in Java - an introduction for newcomers
Some other Articles
Keyboard reader for Java programming newcomers
When I am old, what will worry me?
Taking my life in my hands in Swansea
Arrays in Java - an introduction for newcomers
A behaviour driven example of writing a Java program
Incrementing a variable in Java - Pre and Post Increment
Python base and inherited classes, test harness and unit testing - new examples
Politics and the railway the connects Wiltshire
My first official measure - Passenger Entrys and Exits - revisited 9 years later
Segmentation Fault, Segmentation Violation, Bus Error, Stack Smashing
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4346_A-b ... ogram.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb