Skip to content

Instantly share code, notes, and snippets.

View johnmcc's full-sized avatar

John McCollum johnmcc

  • Glasgow, Scotland
View GitHub Profile
<?php
// Link to /download_file/$fid to force download rather than view in browser
/*
* Implements hook_menu()
*/
function download_file_menu(){
$items = array();
$items['download_file/%'] = array(

Java problems.

Choose one:

Task 1

  • Write a guessing game where the user has to guess a secret number.
  • After every guess the program tells the user whether their number was too large or too small.
  • At the end the number of tries needed should be printed.

Online Shop.

Model an online shop.

You are tasked with creating an e-commerce platform. Your online store may sell anything you wish. It could be a niche, boutique store or a more general 'amazon' type. Customers will log in, add items to their basket and purchase them.

Your shop should include; A stock class with quantity, price and availability.