Giter Club home page Giter Club logo

cs.11.01-lab1.1's Introduction

CS.11.01-Lab1.1

Fork this repository. Clone the forked repository into IntelliJ. There are two Java class files: Dateable and Pages. Complete the first question in the Dateable class. Complete the second question in the Pages class.

Once completed, update your repository (commit and push your code changes to your repository), inspect your repository to see that the changes that you made were successfully pushed, and paste to a text file on Schoology the URL to the topmost level of your repository.

On the same page that you pasted your link to in Schoology, state one strength and how you used it in the completion of this lab.

Format your submission exactly as below:

Repository: [insert URL of repository here]

Strength: [state strength used and give a brief description of how you used this strength in the completion of this lab]

  1. Dateable

There is a folk rule stating you should only date someone who is at least seven years older than half your age. For example, an 18-year-old needs to date somebody at least 16 years old ( 7 + ( 18 / 2 ) ).

Produce a program that stores your age as an integer in a variable named age. The program then computes and displays the age of the youngest person for whom dating meets the folk rule.

A sample program run could be :

Prompt + input: Enter your age: 19

Output: 19-year olds should date somebody who is at least 16 years old.

Another sample program run could be:

Prompt + input: Enter your age: 22

Output: 22-year olds should date somebody who is at least 18 years old.

Credit: Thanks to Jim Cohoon at The University of Virginia

  1. Pages

There is a folk rule stating the number of pages you should read before giving up on a book is 100 - your age. For example, a 21 year old needs to read 79 pages ( 100 - 21 ). Write a program that stores your age as an integer in a variable named age. The program then computes and displays the minimal number of pages to read.

A sample run could be:

Prompt + input: Enter your age: 18

Output: 18-year olds should read at least 82 pages before giving up on a book.

Another sample program run could be:

Prompt + input : Enter your age: 30

Output: 30-year olds should read at least 70 pages before giving up on a book.

Credit: Thanks to Jim Cohoon at The University of Virginia

cs.11.01-lab1.1's People

Contributors

techarenz avatar alexpak3 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.