A command line utility

Related tags

Spring Boot CUD
Overview

CUD

A command line utility

Create a command line utility that will compute the price for a pizza order.

The list of pizzas will be provided as a text file. The full path to the order file will be specified as a command line argument. The order file will contain one or many lines each containing a pizza order. Each pizza is a comma-separated list starting with a size (Small, Medium, or Large) and any number of toppings (see below). A small sample of data can be found at the end of this document and a full sample file (order.txt) is attached.

To price an order of pizzas, you must start with a base price based on size of the pizza referred in the table below and add an additional cost for each topping.

Base Price Standard Toppings Premium Toppings
Small 8 .50 1
Medium 10 .75 1.50
Large 12 1 2
Standard Topping Premium Toppings
Peppers Sausage
Onion Pepperoni
Mushroom
Olives
Spinach

For example, with the sample data below, the first pizza would be priced as $13 ($10 Base + $.75 x2 + $1.50) and the second pizza would be priced as $8.50 ($8 + $.50). So, the entire order would be priced at $21.50. The correct score for the attached orders.txt file is $128.00

Your solution should be submitted as source files only – no compiled binaries or jar files are to be submitted. The code should be syntactically correct and compile without errors. You are encouraged to use any common open source Java libraries that you feel will help; however, you must provide a manifest of dependent libraries as one of the source files.

The solution design should allow for flexibility, extensibility, and scalability to accommodate additional future requirements. Developer should be prepared to discuss how to extend the solution to support additional requirements. Additional planned functionality include:

  • The company is planning on adding additional items such as appetizers and drinks to the menu. These items have their own unique set of options and pricing.
  • This order pricing feature will be added to the company's website, allowing customers to place orders directly via a REST API in addition to receiving orders via files.
  • The company will allow users to submit different toppings for each half of the pizza (i.e. half Pepper and half Sausage)

Your code should be written as if it were part of a real company codebase. As such, it should be optimized for readability and maintainability. Unit test coverage is highly desirable.

Sample order file data:

Medium,Peppers,Onions,Sausage

Small,Olives

Large,Sausage

Medium,Sausage,Mushroom

Medium

Small,Olives,Pepperoni

Large

Small,Peppers,Onion,Spinach

Large,Mushroom,Pepperoni

Small,Sausage

Medium,Peppers,Mushroom,Olives

Small,Peppers,Onion,Mushroom,Olives,Spinach,Sausage,Pepperoni

Large

You might also like...

PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.

PipelinR PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your awesome Java app. PipelinR has been battle-proven on production, as

Jan 8, 2023

Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

Oct 4, 2022

Java controlled pub command execution

OPIUM - Operate pub interface under machine. This package allows operating pub command with Java object only and return console context. Perquisites C

Jan 23, 2022

Server grouping /hub and /lobby command

BungeeHub Server grouping /hub and /lobby command This plugin only needs to be installed in BungeeCord/Waterfall. There is currently no development pl

Dec 12, 2022

A mod that adds a /btellraw command which provides several enhancement over vanilla's tellraw.

Better Tellraw A mod that adds a /btellraw command which provides several enhancement over vanilla's tellraw. This mod only affects the server-side en

Jun 8, 2022

A plugin that open the GC command execution interface for third-party clients

gc-opencommand-plugin 中文 | English 一个为第三方客户端开放GC命令执行接口的插件 服务端安装 在 Release 下载 jar 放入 plugins 文件夹即可 控制台连接 首次启动时,会在 plugins 目录下生成一个 opencommand-plugin 目录

Jan 1, 2023

A Minecraft Plugin For 1.8.8 - 1.19.2 For Giving A Player A Custom Item On Join Which Executes A Command On Right Click

PixelPlayz Custom Item A Minecraft Plugin For 1.8.8 - 1.19.2 For Giving A Player A Custom Item On Join Which Executes A Command On Right Click Install

Sep 9, 2022

A command line utility

CUD A command line utility Create a command line utility that will compute the price for a pizza order. The list of pizzas will be provided as a text

Feb 4, 2022

Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

Nov 26, 2022

A command line parser generator

jbock is a command line parser that works similar to airline and picocli. While most of these other tools scan for annotations at runtime, jbock is an

Dec 13, 2022

Command line parsing framework for Java

JCommander This is an annotation based parameter parsing framework for Java 8. Here is a quick example: public class JCommanderTest { @Parameter

Dec 29, 2022

The SDKMAN! Command Line Interface

SDKMAN! CLI The Software Development Kit Manager Command Line Interface SDKMAN is a tool for managing parallel Versions of multiple Software Developme

Jan 4, 2023

Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

Jan 6, 2023

Command-line API for Atlassian JIRA using the Tomitribe CREST library

Atlassian JIRA Command-Line (CLI) Jamira is a command-line API for Atlassian JIRA using the Tomitribe CREST library. Installation Jamira can be downlo

Sep 10, 2022

A command line client for Kafka Connect

kcctl -- A CLI for Apache Kafka Connect This project is a command-line client for Kafka Connect. Relying on the idioms and semantics of kubectl, it al

Dec 19, 2022

A command line client for Kafka Connect

A command line client for Kafka Connect

🧸 kcctl – Your Cuddly CLI for Apache Kafka Connect This project is a command-line client for Kafka Connect. Relying on the idioms and semantics of ku

Dec 19, 2022
Owner
jk
@Software Developer
jk
A command-line tool to generate different types of noise as images.

noisegen A command-line tool to generate different types of noise as images. Usage Run one of the releases, either the JAR using java -jar noisegen-0.

Tommy Ettinger 6 Jul 21, 2022
Excel utility for Java to read and write data in declarative way.

Data Excel Exporter A Java wrapper using Apache POI to read and write Excel file in declarative fashion. Installation ExcelUtil is using Apache POI ve

null 27 Oct 16, 2022
The utility is designed to implement version control of APEX application pages.

Oracle APEX version control tool The utility is designed to implement version control of APEX application pages. How it works The developer exports th

Oleksii Vykhristiyk 6 Aug 25, 2022
COMPortNotifier - Smol utility to send you a notification every time you connect, or disconnect a COM port.

COMPortNotifier A smol utility that sends you a notification every time a COM port is connected, or disconnected on your computer. Useful for electric

Matt Foulks 1 Sep 7, 2022
High Performance data structures and utility methods for Java

Agrona Agrona provides a library of data structures and utility methods that are a common need when building high-performance applications in Java. Ma

Real Logic 2.5k Jan 7, 2023
A 1.18.1 minecraft Utility Client

saturn-client A 1.18.1 minecraft Utility Client Licensing This project is under the GNU v3.0 licensing. If you use any code from this project you must

Gavin 16 Dec 2, 2022
1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds

BlockChanger 1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds Setup Just import the class to your project. Usage Playe

null 25 Dec 23, 2022
A Minecraft 1.17.1-1.18.2 utility client for Fabric.

MatHax A Minecraft 1.17.1-1.18.1 utility client for Fabric Usage Building Clone this repository Run ./gradlew build Installation Follow guide on the w

MatHax 107 Jan 5, 2023
An annotation-based command framework for Bukkit

Blade Blade is an easy-to-use command framework based on annotations. It currently only supports Bukkit, but it can be easily extended to more platfor

null 40 Nov 6, 2022
An evil RMI server that can launch an arbitrary command. May be useful for CVE-2021-44228

evil-rmi-server An evil RMI server that can launch an arbitrary command. May be useful for CVE-2021-44228 in a local privesc scenario Build ./gradlew

Adam Bertrand 12 Nov 9, 2022