1. Home
  2. /
  3. Jovial
  4. /
  5. Shopping Cart

Shopping Cart - Jovial Typing CST Test

Loading…

Shopping Cart — Jovial Code

Adds and removes items in a shopping cart with total cost.

PROGRAM ShoppingCart;
CHARACTER CART(10,20);
INTEGER PRICES(10);
INTEGER COUNT := 0;

PROCEDURE ADDITEM(ITEM,PRICE);
BEGIN
	CART(COUNT) := ITEM;
	PRICES(COUNT) := PRICE;
	COUNT := COUNT + 1;
END ADDITEM;

PROCEDURE REMOVEITEM(IDX);
INTEGER I;
BEGIN
	FOR I := IDX TO COUNT-2 DO
		CART(I) := CART(I+1);
		PRICES(I) := PRICES(I+1);
	END;
	COUNT := COUNT - 1;
END REMOVEITEM;

BEGIN
	CALL ADDITEM('Apple',2);
	CALL ADDITEM('Banana',3);
	CALL REMOVEITEM(0);
END;

Jovial Language Guide

JOVIAL (Jules Own Version of the International Algorithmic Language) is a high-level programming language derived from ALGOL, designed in the late 1950s and early 1960s for embedded and real-time military systems. It emphasizes structured programming and reliability for mission-critical applications.

Primary Use Cases

  • ▸Embedded avionics systems
  • ▸Real-time radar and defense applications
  • ▸Mission-critical aerospace software
  • ▸Command and control systems
  • ▸Legacy defense software maintenance

Notable Features

  • ▸Derived from ALGOL with extensions for embedded systems
  • ▸Structured programming with block constructs
  • ▸Support for fixed-point and integer arithmetic
  • ▸Efficient memory and resource management
  • ▸Real-time system constructs and control statements

Origin & Creator

JOVIAL was developed by Jules Schwartz at System Development Corporation (SDC) in the late 1950s to early 1960s for military and aerospace software applications.

Industrial Note

JOVIAL is highly specialized for embedded military and avionics systems and is rarely used outside defense industries or legacy projects.

More Jovial Typing Exercises

JOVIAL Counter and heme ToggleJOVIAL Random Number GeneratorJOVIAL Todo ListJOVIAL Dice RollerJOVIAL Countdown TimerJOVIAL Prime CheckerJOVIAL Temperature ConverterJOVIAL Name GreetingJOVIAL Stopwatch

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher