Lab01
basics I spent 3 hours to complete this assignment Created basics directory It contains Main Java file.
Main Java has 3 methods:-
pluralize: accepts a word and a number and returns a string with an “s”. flipNHeads: accepts an integer n and flips coins until n heads are flipped in a row. clock: print out the current time second by second.
Lab: 02 - Arrays, for loops, testing Library I spent 4 hours to complete this assignment Created Library directory It contains Main Java file.
roll : accepts an integer n roll the method returns an array of values. containsDuplicate : return true or false depending on delicable valuse. avarege : given an array calculate the avarege value for ech array and return with the lowest avarege
Lab: 03 maps and linter
Library.Java has 2 new methods: monthlyTemperatures a function that take need an array of arrays ,find the min and max values. track of all the unique temperatures and create a String containing any temperature not seen during the month
tally a function that accepts a List of Sword and a number and returns a string wgot the most votes.
linter - App.java
- linter checkErr a function that that reads a JavaScript file in a certain path and generates an emi-colon; {; Don’t show an error if the line ends with an closing curly brace }; Don’t show an error if the line contains if or else;
library.java : the driver file and is used to run the functions from Restaurant.java. Restaurant.java : the class that we Inherit from it. Review.java : a class that it used to Inherit sub classed for the "addReview" function. Theater.java : for Theater.
a test to create an instad ensure that its tng properly. test to create an instance of its toString is working properly. tests to ensure that when you call addReview,
#Composition and Inheritance,
library.java : the driver file and is used to run the functions from Restaurant.java. Restaurant.java : the class that we Inherit from it. Review.java : a class that it used to Inherit sub classed for the "addReview" function. Shop.java : for shops and places that are not restaurants. Theater.java : for Theater. Testing
a test to create an instance of Restaurant and ensure that its toString is working properly. a test to create an instance of Review and ensure that its toString is working properly. a tests to ensure that when you call addReview, the association is created between the Restaurant and the Review. tests. (In particular, ensure that if you’re trying to call addReview when the restaurant and the review are already associated, the star rating of the restaurant does not update.) Inheritance