Skip to content

Instantly share code, notes, and snippets.

@vivchak
vivchak / README.md
Last active June 16, 2020 10:26 — forked from codecademydev/TransitCalculator.java
Codecademy export

Best Fare Calculator

Overview:

This project is slightly different than others you have encountered thus far on Codecademy. Instead of a step-by-step tutorial, this project contains a series of open-ended requirements which describe the project you’ll be building. There are many possible ways to correctly fulfill all of these requirements, and you should expect to use the internet, Codecademy, and other resources when you encounter a problem that you cannot easily solve.

Project Goals:

If you’ve ever wondered if you chose the right fare option for riding the metro or bus, you’re not alone. In this project you will write a Java program that determines the best fare option for someone visiting New York City who plans to use the NYC transit system. The program should use constructors, methods, conditionals, loops, and arrays.

Discount

The NYC transit system also offers reduced fare options for people with disabilities and people who are at least 65 years old. Refactor the TransitCalculator clas

// DNA sequencing program
// It begins with a “start codon”: ATG.
// It ends with a “stop codon”: TGA.
// In between, each additional codon is a sequence of three nucleotides.
/*
So for example:
ATGCGATACTGA is a protein because it has the start codon ATG, the stop codon TGA, and the length is divisible by 3.
ATGCGATAGA is not a protein because the sequence length is not divisible by 3, so the third condition is not satisfied.
// Import statement:
import java.util.ArrayList;
class PrimeDirective {
// Add your methods here:
// Creating a isPrime Method which returns boolean value
public boolean isPrime(int number){
if (number == 2) {
return true;
@vivchak
vivchak / FizzBuzz.java
Last active June 8, 2020 11:10 — forked from codecademydev/FizzBuzz.java
Codecademy export
public class FizzBuzz{
public static void main(String[] args){
for (int i = 1; i<= 100 ; i++){
if (i % 3 == 0 && i % 5 == 0){
System.out.println("FizzBuzz!");
}
else if (i % 3 == 0){
@vivchak
vivchak / README-WorkAround.md
Last active May 18, 2020 10:56 — forked from codecademydev/employee.js
Codecademy export

WorkAround is a human resources program that returns basic information about an employee, based on salary data. Using WorkAround, one can use an employee’s salary data to:

return the cadre of the of the employee, in other words, whether this employee is entry level, mid level, or senior level.
calculate employee tax rates
return employee benefits
calculate employee bonuses
calculate the total amount an employee can be reimbursed based on the total value of their health, housing, or wellness benefits

WorkAround currently contains the data and functions in a single file, though they would like to modify the program so it makes use of JavaScript modules. Specifically, WorkAround asks you to demonstrate the different ways to export and import modules.

@vivchak
vivchak / README.md
Last active May 17, 2020 11:05 — forked from codecademydev/message.js
Codecademy export

Message Mixer

Message Mixer is a messaging service that allows you to perform an action on input text and display the output of that behavior to the console. For example, with the current functions defined in Message Mixer, you can:

- count the characters in a message
- capitalize the first character of words
- reverse a message’s words in place
- reversing characters in place
- replace the first occurrence of a string
  • replace all occurrences of a string
@vivchak
vivchak / README.md
Last active December 3, 2025 15:18
School Catalogue Project

School Catalogue Project

The Department of Education wants the catalog to hold quick reference material for each school in the city.

We need to create classes for primary, middle, and high schools. Because these classes share properties and methods, each will inherit from a parent School class. Our parent and three child classes have the following properties, getters, setters, and methods: School

Properties: name (string), level (one of three strings: 'primary', 'middle', or 'high'), and numberOfStudents (number)
Getters: all properties have getters

Setters: the numberOfStudents property has a setter

@vivchak
vivchak / Build-a-Library.js
Last active May 7, 2020 12:47 — forked from codecademydev/app.js
Codecademy export
// Base Class or Parent Class
class Media {
constructor(title){
this._title = title;
this._isCheckedOut = false;
this._ratings = [];
}
get title() {return this._title;}
get isCheckedOut() {return this._isCheckedOut;}
@vivchak
vivchak / README-Template.md
Last active May 6, 2020 05:16 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@vivchak
vivchak / README.md
Last active May 7, 2020 12:48 — forked from codecademydev/app.js
Team Stats Project

Team Stats

We want to create and extract information about your favorite sports team. Basketball, soccer, tennis, or water polo, you pick it. It’s your job to create data using the JavaScript data structures at your disposal: arrays, objects, etc.

Once created, you can manipulate these data structures as well as gain insights from them. For example, you might want to get the total number of games your team has played, or the average score of all of their games.