Code Monkey home page Code Monkey logo

Hi ๐Ÿ‘‹, I'm Kevin Bell

I'm a student!

  • ๐Ÿค Iโ€™m looking to collaborate on almost anything open-source.
  • ๐Ÿ”จ Iโ€™m currently working on my Computer Science degree.

๐Ÿ› ๏ธ My favorite tools

๐Ÿ‘จโ€๐Ÿ’ป Programming and markup languages

C++ CSS HTML Java JavaScript Scratch SQL

๐Ÿงฐ Frameworks and libraries

GitHub Actions JUnit TensorFlow Wordpress

๐Ÿ—„๏ธ Databases and cloud hosting

GitHub Pages MySQL

๐Ÿ’ป Software and tools

Android Brave Discord Git GitHub Desktop Google Sheets Stack Overflow Visual Studio Code

I love free/libre open-source software! Most JavaScript running on most websites (including GitHub.com) is NOT open-source software.

Kevin Bell's Projects

silverstripe-cms icon silverstripe-cms

SilverStripe CMS - this is a module for Sapphire rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.

silverstripe-news icon silverstripe-news

A basic news article module, including page types and functionality common to a news archive

silverstripe-userforms icon silverstripe-userforms

UserForms module provides a visual form builder for the SilverStripe CMS. No coding required to build forms such as contact pages.

stacks icon stacks

Create a project that practices queues and stacks. Look at the projects in Fig 10.11, the Chipotles Queue project, and Figures 10.13 a, b, and c, the Driveway Parking program, as references. from Introduction to Programming with Java A Problem Solving Approach, Second Edition by John Dean and Raymond Dean Instructions for the code to create and work with a queue: Create a queue Add 3 names to it Print the queue Remove a name and print it Print the queue Add another name Print the queue In a loop, until the queue is empty, remove a name and print it

storeinventoryproject icon storeinventoryproject

SDEV 2210 Project. In this project, you will work with a storeโ€™s inventory โ€“ entering items with price and quantity, then allowing the user to purchase items. The Sales Clerk example in the book can be a guide for this exercise. There will be 2 classes and a driver class. One class describes a single item in inventory. One class describe the inventory of a store, multiple items stored in an array. Create a class named Inventory, which has instance variables for the name, price and quantity of each inventory item. The constructor needs 3 parameters, one for each instance variable. Include separate methods to get the name, the price, and the quantity of an item. Create a method to display an item, with its name, price, and quantity on the same line โ€“ return the string with this data, do not print to the screen in this method. Create a method to sell, which needs as a parameter the quantity of this item being purchased, and returns the price of the item, the instance variable for price of a single item (not the cost of this item times the quantity purchased in this sale). In this method, test if there is enough of the item in inventory for the purchase, and if there is, subtract the quantity from the inventory and return the itemโ€™s price. If there is not enough quantity, return a value of 0 โ€“ this price of zero means the purchase was not completed. Create a class named Store, which uses an array to hold the inventory for its items. This class needs instance variables for the size of the inventory โ€“ for this exercise, initialize that value to 2, but be sure to use the variable in the code, do not hard-code the value of 2 anywhere else, only as the initialization value. The class also needs an instance variable for an array of Inventory items โ€“ declare its name and type in the method variables only. In the constructor, allocate the space for the array using the size variable. This allows for future modification of the program, where the user can specify how many items are in inventory. If the size is not known until after the user provides the number, then the array canโ€™t be allocated until after that interaction occurs. That is, you canโ€™t write the combined declaration and allocation of the array in one line of code โ€“ you have to declare it with the method variables, and allocate it (using the โ€œnewโ€ keyword) in the constructor. The constructor needs to ask the user for the name of each inventory item, price, and quantity, and use that data to construct an item and store the it in the array. If you look at the Sales Clerk example in the book, you will see this same logic. The Store class also needs methods to find an item in the array, display an item, and sell an item. When trying to find an item in the inventory, return either the index into the array where it exists, or -1 if it is not found. In the method to display, use a For-Each loop to call the method in the Inventory class for displaying the data for an item โ€“ note this MUST be a For-Each loop, not a regular For loop. In the method to sell an item, first find the item, and if it is found, call the method in the Inventory class that sells a quantity of an item and returns its price. If the item is not found, print a message that the item canโ€™t be found, and return a value of 0 (a price of 0 means it wasnโ€™t found or the item doesnโ€™t have enough quantity for the sale). In the driver class, instantiate a Store variable. That will call the constructor in Store that will ask the user about the items and fill the array of inventory items. Then call the method to display the inventory. In a loop, ask the user which item they want to purchase and the quantity. Call the sell method in the Store class, which will need the name of the item and the quantity to purchase, and which returns the price of the item, so call this method in an assignment statement, assigning the results to a cost variable. If the cost is 0, print a message that there is not sufficient quantity for that sale, or print the cost of the purchase (price * quantity). Then ask if the user wants to continue. Be sure to format the cost as a money transaction (dollar sign, 2 decimal places). Note that when the inventory is displayed after a sale, it will show a smaller quantity of that item in inventory. Note that there are 2 methods named display() and 2 methods named sell(). There is no conflict and they are not overloaded because they are in different classes. The sell() method in the Store class needs to display an error message to the user if the item was not found in the inventory. Note that there is no method in the Inventory class that uses the keyboard or screen. The Store class asks the user for inventory information and also displays the inventory on the screen. The driver class works in a loop to ask the user which item and the quantity of the purchase. If the item exists and there is sufficient inventory, the price for a single item is returned by the sell() method. A price of 0 means there was not enough inventory for that quantity of purchase. If the price is not 0, the driver class calculates the purchase cost of (quantity * price) and displays that. The inventory is displayed, and should show a different quantity if the purchase was successful. The user is asked if they want to continue; if yes, repeat the loop; if no, close the program. Notice that this sample session tests all of the possible paths of execution โ€“ invalid item name, invalid quantity, valid item name, valid quantity. Take screenshots of the execution that matches the sample session. Then change the size of the inventory array to 3, add another inventory item, and test all the paths of execution. Take screenshots of that session. Submission: the specified screenshots, and the root folder for the project Pay careful attention to the rubric for this assignment. Remember the standards that apply to every project. Note that you must use correct formatting in the code -- appropriate indentation is most important. You can use Shift-Alt-F to have NetBeans automatically format the code correctly. If the formatting is incorrect, it will be returned to you for changes with a grade of zero. Note: You need to submit the whole project for these assignments. In File Explorer, go to the location where you created the project. There will be a folder with the name of your project -- that is the root folder of the project. If you submit the root folder of the project, the instructor can run it on a different machine to grade it. If you don't submit the proper folder, it won't run on another machine, and the assignment will be marked with a zero.

stringincrementer icon stringincrementer

Your job is to write a function which increments a string, to create a new string. If the string already ends with a number, the number should be incremented by 1. If the string does not end with a number. the number 1 should be appended to the new string. Examples: foo -> foo1 foobar23 -> foobar24 foo0042 -> foo0043 foo9 -> foo10 foo099 -> foo100 Attention: If the number has leading zeros the amount of digits should be considered.

stringmethoddemo icon stringmethoddemo

This program uses the isEmpty method as part of an input validation while loop. The while loop forces the user to enter a non-empty name.

studentscoresinfile icon studentscoresinfile

WARNING: THIS FILE IS NOT COMPLETE AND HAS MANY ERRORS Ask user for input of names & scores & write that data to a file, with a name on 1 line & the score on the next; it reads that same data file & prints the data; & it finds the low, high, & average of the scores. After the file has been read, calculate & display the lowest, highest, & average scores.

substringretrieval icon substringretrieval

Substring Retrieval using beginIndex and afterEndIndex. Voltaire, Candide (year 1759)

tabler-icons icon tabler-icons

A set of over 2050 free MIT-licensed high-quality SVG icons for you to use in your web projects.

tdc icon tdc

TDF's download counter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.