Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/amankushwaha577/glau_oop_2019_assignment1_solution
- Owner: amankushwaha577
- Created: 2019-08-22T17:37:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-22T17:37:22.000Z (over 5 years ago)
- Last Synced: 2023-07-30T09:24:48.599Z (over 1 year ago)
- Language: Java
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```