Assignment Overview You are tasked with creating a program for a pizza shop –however, as this is a comparative languages course, you will be creating the same application in the following programming...

1 answer below »
Assignment Overview You are tasked with creating a program for a pizza shop –however, as this is a comparative languages course, you will be creating the same application in the following programming languages:  C,  Python,  Java and  Lisp. As you implement the application in each language, you should keep notes on the features of the languages used, which you found useful, as well as any issues or complications which arose due to the complexity or lack of any language features. A brief discussion based on these programming features for each individual language accompanying each implementation is required. Finally, a comparative overview of the languages highlighting applicability based on your experience in the design, implementation and debugging of your code is also required. If you foresee or encounter any complications, you may opt to implement or incorporate additional language features which may be lacking, i.e. data structures. This can be done via:  Your own implementation,  Through libraries, or  Via the incorporation of existing source code. You can use code found on the Internet, but use of any existing code must be referenced. Program Specification Users may order one or more pizzas, where each pizza may be either: small, medium or large. Small pizzas cost $5, medium pizzas cost $8 and large pizzas cost $12. All pizzas come on a tomato base (for our pizza shop, this will be the only option), and will have the topping cheese by default, at no extra cost. Users may choose up to a maximum of four additional toppings (bringing the total to five) from the following list, where each topping adds an additional $1 to the price of the pizza:  Bacon,  Olives,  Ham,  Mushrooms, ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 2 of 4  Pineapple,  Salami,  Anchovies. A pizza order consists of an order for one or more pizzas, where each pizza has a size, and may optionally include a list of up to four additional toppings. Each pizza order must be marked as either to be collected or to be delivered. If the pizza is to be collected then the order requires a name and a phone number to be valid. If the pizza is to be delivered then a name, phone number and address are required to be valid. In addition, if the order total is less than $30 then an $8 delivery fee is added to the total. The application must be error tolerant and capable of accepting keyboard input to store a number of pizza orders in memory (they do not have to be persisted to file), as well as displaying an order summary which include details of all orders, including:  The details of each pizza in the order,  The total cost of the order, and  The name, phone number and (if required) address of the person who made the order. Suggested Development Environments Codeblocks for C '99 Code::Blocks can be downloaded from: http://www.codeblocks.org/downloads/binaries To create a new C project is:When you create a project, choose File | New and then Console Application, and then choose C as the programming language. IDLE for Python Python, including the IDLE development environment can be downloaded from: https://www.python.org/downloads/ Eclipse for Java 7 or Java 8 Eclipse may be freely downloaded from: http://www.eclipse.org/downloads/ Eclipse does not come with the Java JDK, which must the downloaded separately from: http://www.oracle.com/technetwork/java/javase/downloads/index.html Ensure that your Eclipse type and Java type match –i.e. 32-bit Java for 32-bit Eclipse, or 64-bit Java for 64-bit Eclipse. If you mix and match it won't work. GNU CLisp for Common Lisp CLISP 2.49 can be sourced from: http://sourceforge.net/projects/clisp/files/latest/download Any good text editor would be suitable for writing the source code. ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 3 of 4 Additional Documentation – Language Suitability Report The design of each programming language incorporates a number of decisions about the language which make it more or less suitable for given tasks. During your implementation of the pizza program in each of the languages you should make notes about the language features which exist or do not exist, and which have therefore made program development easier or more difficult. Where a language has not provided a feature which would have been useful to the implementation of the program, or where the complexity of using a language feature has been high you should remark upon it and briefly discuss a mechanism or feature of another language which would have made development easier. After completing the application in all languages(or as many as you can), discuss the comparative ease of implementation in terms of the design, implementation and debugging for each programming language, including how robustness issues were addressed. Submission and Marking Process You mustsupply your program source code files and language suitability report documentation in as single compressed archive called: ITECH5403_Assignment_2__.zip You may supply your programming language suitability report in either Word or LibreOffice/OpenOffice format in which the document can be edited – no proprietary Mac specific formats, please. Assignments will be marked on the basis of fulfilment of the requirements and the quality of the work. In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to):  Incomplete implementation(s), and  Incomplete submissions (e.g. missing files), and  Poor spelling and grammar. Submit your assignment (all program source files plus your discussion document) to the Assignment 2 Upload location on Moodle before the deadline of Friday of Week 11 at 4pm. The mark distribution for this assignment is explained on the next page. ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 4 of 4 Assignment 2 – Parallel Implementations Student name: Student ID: Requirement Weight Mark Implementation of the pizza shop program in the C programming language. Areas of note include: - Use of data structures, - Robust input handling which does not cause program termination if provided with bad data (i.e. program expects a number, gets given alphanumerical data). Discussion on implementation: - Language features, issues and suitability. 15 5 Implementation of the pizza shop program in the Python programming language. Areas of note include: - Python Standard library, - List mechanisms, Discussion on implementation: - Language features, issues and suitability 15 5 Implementation of the pizza shop program in the Java programming language. Areas of note include: - Object orientation mechanism / method calls, - Error handling - Standard Java libraries Discussion on implementation - Language features, issues and suitability 15 5 Implementation of the pizza shop program in the Lisp programming language. Areas of note include the Lisp: - Use of recursion - lists - Inbuilt data structures Discussion on implementation - Language features, issues and suitability 15 5 Documentation and discussion of the comparative ease of implementation (design / implement / debug) in each programming language, including how robustness issues were addressed. 15 Spelling and grammar 5 Assignment mark total / 100 Contribution to unit mark (out of 20%) %
Answered Same DaySep 20, 2020ITECH5403

Answer To: Assignment Overview You are tasked with creating a program for a pizza shop –however, as this is a...

Meenakshi answered on Sep 25 2020
161 Votes
pizzaorderingsystem/Assign1/OrderPizza.class
package Assign1;
public synchronized class OrderPizza {
private int id;
private String name;
private String telephonenumber;
private String order;
private String type;
double totalCost;
double price;
double deliCost;
public void OrderPizza();
public void setId(int);
public void setName(String);
public void setPhoneNumber(String);
public void setOrder(String);
public void setType(String);
public int getId();
public String getName();
public String getteletelephonenumber();
public String getOrder();
public String getType();
public double deter_PizzaPr
ice();
public double totalCost();
}
pizzaorderingsystem/Assign1/OrderPizza.java
pizzaorderingsystem/Assign1/OrderPizza.java
package Assign1;
import java.util.Scanner;
public class OrderPizza {

  //declaring variables
  private int id;
  private String name;
  private String telephonenumber;
  private String order;
  private String type;
  //constructor
  public OrderPizza() {
    setId (1000);
    setName ("pizzaname");
    setPhoneNumber ("xxxx");
    setOrder ("pizzaorder");
    setType ("pizzatype");
  }
  //setters
  public void setId(int id) {
    this.id = id;
  }
  public void setName(String name) {
    this.name = name;
  }
  public void setPhoneNumber(String telephonenumber) {
    this.telephonenumber = telephonenumber;
  }
  public void setOrder(String order) {
    this.order = order;
  }
  public void setType(String type) {
    this.type = type;
  }

  //getters
  public int getId() {
    return id;
  }
  public String getName() {
    return name;
  }
  public String getteletelephonenumber() {
    return telephonenumber;
  }
  public String getOrder() {
    return order;
  }
  public String getType() {
    return type;
  }


  //declaring variables for methods of cost and total cost of pizza

  double totalCost; //c is the total cost (in dollars)
  double price; //p is the cost of the pizza
  double deliCost; //t is cost of the delivery


  //method for determining pizza price
  public double deter_PizzaPrice(){
    if (getOrder().equals("Hawaiian")){
      price = 14.95;
    }//end if for order Hawaiian
    else if (getOrder().equals("Meat Lovers")){
      price = 17.95;
    }//end else-if for order Meat Lovers

    else if (getOrder().equals("Aussie")){
      price = 16.95;
    }
    //end else-if for order Aussie
    else if (getOrder().equals("Supreme")){
      price = 15.95;
    }//end else-if for order Supreme
    else if (getOrder().equals("Pepperoni")){
      price = 13.95;
    }//end else-if for order Pepperoni
    else {
      System.out.println("Error: Incorrect Order name has been entered. Please ensure it is spelt correctly"); 
    }//end else 
    return price;
  }


  public double totalCost(){
    if (getType().equals("Pick-up")){
      deliCost = 0;
    }//end if delivery
    else if (getType().equals("Delivery")){
      deliCost = 7;
    }//end else-if delivery
    return totalCost = price + deliCost;
  }
}
 class OrderPizzaManager {
  public static void main(String[] args) {
// Declare Variables
    int num_Pizza_Ordered;
    int num_CurrPizza = 1;
//Declare input Scanners
    Scanner num_Pizza_OrderedScanner = new Scanner(System.in);
    Scanner scanner = new Scanner(System.in);
//Adding a new Order
    System.out.println("Pizza Order Menu");
    System.out.println("===================");
    System.out.println("");
    System.out.print("Enter number of Pizza Orders: ");
    num_Pizza_Ordered = num_Pizza_OrderedScanner.nextInt();
    System.out.println("");
//declaring a counter
    int i = 1; 
//creating a loop to display entry details for pizzas
    while (i<=num_Pizza_Ordered){
      System.out.println("Enter Details of Pizza Order " + num_CurrPizza + ":");
      System.out.println("===================");
//Details of the new order
      OrderPizza p1 = new OrderPizza();
      System.out.print("ID: ");
      p1.setId(scanner.nextInt());
      if (p1.getId() <= 1000) {
        System.out.print("Please enter a number higher than 1000: ");
        p1.setId(scanner.nextInt());
      }
      scanner.nextLine();
      System.out.print("Name: ");
      p1.setName(scanner.nextLine());
      System.out.print("Phone: ");
      p1.setPhoneNumber(scanner.nextLine());
      System.out.print("Order: ");
      p1.setOrder(scanner.nextLine().trim());
      System.out.print("Type (Pick-Up or Delivery): ");
      p1.setType(scanner.next());
//Display Pizza Order Details
      System.out.println("");
      System.out.println("Details of Pizza Order " + num_CurrPizza + ":");
      System.out.println("=======================");
      System.out.println("ID: " + p1.getId());
      System.out.println("Name: "+ p1.getName());
      System.out.println("Phone: "+ p1.getteletelephonenumber()); 
System.out.println("Order: "+ p1.getOrder());   //Type of Pizza eg; Peperoni
System.out.println("Type (Pick-up or Delivery): "+ p1.getType());   // Pickup or Delivery 
System.out.println("Pizza Cost ($): "+ p1.deter_PizzaPrice());
//  System.out.println("Delivery cost($): " + p1.deliCost());
System.out.println("Calculate total cost ($): " +p1.totalCost());
num_CurrPizza = num_CurrPizza + 1;
i++;
} //end while
}
}
pizzaorderingsystem/Assign1/OrderPizzaManager.class
package Assign1;
synchronized class OrderPizzaManager {
void OrderPizzaManager();
public static void main(String[]);
}
pizzaorderingsystem/pizzaorder.c
#include
#include
#include
#include
#include
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
                
//**************************************
// Name: PizzaDeliverySystem...
// Description:The purpose is to display the working of the automated pizza delivery system.
// By: SyedUmairAliShah (from psc cd)
//
// Inputs:not any
//
// Returns:notany
//
// Assumes:not any self explainatory code.
if you like it than rate me , comment me and mail me too.
//
// Side Effects:not any
//**************************************
#include
#include
#include
#include
#include
class AbstractPizza{
protected:
    unsigned int price;
    int olives;
    int mushrooms;
    float flour;
    int onion;
    int cheese;
    int tomatoes;
    int chicken;
    int beef;
public:
    virtual void bake()=0;
    virtual int returnprice()=0;
//    virtual ~AbstractPizza();
};
class ChickenTikkaPizza : public AbstractPizza{
public:
    ChickenTikkaPizza();
    void bake();
    int returnprice(){ return price;}
};
void ChickenTikkaPizza::ChickenTikkaPizza(){
    price= 450;
    olives=20;
    mushrooms=20;
    flour=2;
    onion=5;
    cheese=2;
    tomatoes= 4;
    chicken= 2;
    beef=3;
}
void...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here