Coder Social home page Coder Social logo

assignment1-abhishek9690's Introduction

BCSC0002 - Object-Oriented Programming

Assignment 1

Date: 12 August 2019.

Deadline: 24 August 2019 till midnight.

Instructions

  1. You are to clone this repository and use this as the template code for your solution.
  2. Please do not host code that you did not write. Doing so will be an act of misconduct.
  3. You are free to ask for help from me by creating an issue here

Problem Statement

Recall, that if an object is released so that it falls, the speed of the object at time t seconds after its release is calculated to be gt and the distance the object has travelled in those t seconds after its release is . Here, g is the gravity constant. Its value is approximately 9.8.

Write a program in which, the method main performs the following actions:

  1. The program declares the variables time for time, speed for the speed, and distance for the distance travelled.
  2. The program assigns value to time.
  3. The program calculates the speed and the distance.
  4. The program prints the calculated values.

Input Format

The program will input a single value t for the time after its release.

Output Format

The program will output the calculated values in the following format:

The speed of the object at <t> seconds after its release is <speed> and the distance the object has travelled in the <t> seconds after the relase is <distance>

Sample Input

6.0

Sample Output

The speed of the object at 6.0 seconds after its release is 58.800000000000004 and the distance the object has travelled in the 6.0 seconds after the relase is 176.4

assignment1-abhishek9690's People

Contributors

abhishek9690 avatar dbc2201 avatar

Watchers

James Cloos avatar  avatar

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.