Git Product home page Git Product logo

cse1223's Introduction

Welcome to My Profile!

This week's code snippet, Hello World in Discus, is brought to you by Subete and the Sample Programs repo.

module Main
import System.IO.Console

where

main ()
 = do   writel "Hello, World!"

Below you'll find an up-to-date list of articles by me on The Renegade Coder. For ease of browsing, emojis let you know the article category (i.e., blog: โœ’๏ธ, code: ๐Ÿ’ป, meta: ๐Ÿ’ญ, teach: ๐ŸŽ)

Also, here are some fun links you can use to support my work.


This document was automatically rendered on 2024-09-20 using SnakeMD.

cse1223's People

Contributors

jrg94 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

rachelsquare

cse1223's Issues

Rework Tests for Project 05

I'm noticing that testing can be really hard if the student doesn't use the exact same punctuation or strings. In fact, it sort of makes testing useless. I may even try to break out the output into different tests.

Project02Test Fails Arbitrarily

For whatever reason, Project02Test fails for some cases yet to be determined.

Culprit:
C:\Users\Jerem\Downloads\submissions\georgeerin_191135_9834175_Project02\Project02\src\osu\cse1223\Project02.java

package osu.cse1223;

import java.util.Scanner;

public class Project02 {

 public static void main(String[] args) {
  
  Scanner keyboard = new Scanner(System.in);
  System.out.println("Enter a long string: ");
  String longText = keyboard.nextLine();
  System.out.println("Enter a substring: ");
  String subText = keyboard.nextLine();
  int longTextLength = longText.length();
  System.out.println("Length of your string: " + longTextLength);
  int subTextLength = subText.length();
  System.out.println("Length of your substring: " + subTextLength);
  int subIndex = longText.indexOf(subText);
  System.out.println("Starting position of your substring in string: " + subIndex);
  String before = longText.substring(0,(subIndex-1));
  System.out.println("String before your substring: " + before);
  int subEndIndex = subIndex + subTextLength;
  String after = longText.substring(subEndIndex);
  System.out.println("String after your substring: " + after);
  System.out.println("Enter a position between 0 and " + (longTextLength - 1) + ": ");
  int position = keyboard.nextInt();
  char random = longText.charAt(position);
  System.out.println("The character at position " + position + " is " + random);
  System.out.println("Enter a replacement string: ");
  Scanner keyboard2 = new Scanner(System.in);
  String userInput = keyboard2.nextLine();
  String replaced = longText.replace(subText, userInput);
  System.out.println("Your new string is: " + replaced);
}}

Test file:
C:\Users\Jerem\Downloads\submissions\Project02Test.java

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.