Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amankushwaha577/glau_oop_2019_assignment1_solution

GLA_OOps_Assignment_Sol
https://github.com/amankushwaha577/glau_oop_2019_assignment1_solution

Last synced: about 1 month ago
JSON representation

GLA_OOps_Assignment_Sol

Awesome Lists containing this project

README

        

# 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. After writing a successful solution, you are supposed to host it on GitHub as a repository with the following name:
`GLAU_OOP_2019_Assignment1_Solution`.
3. Please do not host code that you did not write. Doing so will be an act of misconduct.
4. You are free to ask for help from me via email or WhatsApp.
---

#### 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
![](https://latex.codecogs.com/gif.latex?$$\frac{1}{2}g{t^2}$$).
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 seconds after its release is and the distance the object has travelled in the seconds after the relase is
```
---

#### 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
```