Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions iulia/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>tutorial-java</artifactId>
<groupId>com.imalittletester</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>iulia</artifactId>
<packaging>jar</packaging>

<name>iulia</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>14</source>
<target>14</target>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.7</maven.compiler.source><maven.compiler.target>1.7</maven.compiler.target>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.imalittletester.garmincookies;

import java.util.Date;

public class CookieStructure {

public String name;
public int size;
public long value;
public boolean httpOnly;
public char secure = '✓';
public String priority;
public Date expirationDate;
private boolean isProvidedParamSubDomainOfDomain;

public CookieStructure () { //constructor default
}

public CookieStructure(String name, int size, long value, boolean httpOnly, char secure, String priority, Date expirationDate, boolean isProvidedParamSubDomainOfDomain) {
this.name = name;
this.size = size;
this.value = value;
this.httpOnly = httpOnly;
this.secure = secure;
this.priority = priority;
this.expirationDate = expirationDate;
this.isProvidedParamSubDomainOfDomain = isProvidedParamSubDomainOfDomain;
}//constructor with all fields


public CookieStructure(String name, long value) {
this.name = name;
this.value = value; //constructor name and value
}

@Override
public String toString() {
return "CookieStructure{" +
"name='" + name + '\'' +
", size=" + size +
", value=" + value +
", httpOnly=" + httpOnly +
", secure=" + secure +
", priority='" + priority + '\'' +
", expirationDate=" + expirationDate +
", isProvidedParamSubDomainOfDomain=" + isProvidedParamSubDomainOfDomain +
'}';
}


public boolean isProvidedParamSubDomainOfDomain(String stringToCheck) {
return name.contains(stringToCheck) ;
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.imalittletester.homeworks;

public class MonthHomework {

public boolean checkIfLastDayOfMonth(String monthName, int dayNumber) {
boolean result;

if (monthName.equals("April")|| monthName.equals("June")|| monthName.equals("September")|| monthName.equals("November")) {
result = dayNumber ==30;
return result;
}
if (monthName.equals("February")) {
result = dayNumber==28;
}
else {
result = dayNumber == 31;
}
return result;
}
public int countNumbersDivided(int maxLimit) {
int count = 0;
for (int i = 1; i <= maxLimit; i++) {
if (i % 7 == 0)
{
count++;
}
}
return count;
}
}


69 changes: 69 additions & 0 deletions iulia/src/main/java/com/imalittletester/homeworks/Watch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.imalittletester.homeworks;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Watch {
public String timeStamp;
public double stepsToday;
public double stepsThisWeek;
public float distanceToday;
public String distanceUom;
public int calories;
public Date currentTime;
public int idleAlerts;
public float distanceThisWeek;
public int hour;
private int anInt;

public Watch(String timestamp, double stepsToday, double stepsThisWeek, String distanceUom, int calories, Date currentTime, int idleAlerts, int hour) {
this.timeStamp = timestamp;
this.stepsToday = stepsToday;
this.stepsThisWeek = stepsThisWeek;
this.distanceUom = distanceUom;
this.calories = calories;
this.currentTime = currentTime;
this.idleAlerts = idleAlerts;
this.hour = hour;
}

public double unitConvertorForOneDay() {
double distanceToday = stepsToday;
if (distanceUom.equalsIgnoreCase("km")) {
return stepsToday / 1408;
}
if (distanceUom.equalsIgnoreCase("miles")) {
return stepsToday / 2000;
}
return distanceToday;
}

public double unitConvertorForOneWeek() {
double distanceThisWeek = stepsThisWeek;
if (distanceUom.equalsIgnoreCase("km")) {
return stepsThisWeek / 1408;
}
if (distanceUom.equalsIgnoreCase("miles")) {
return stepsThisWeek / 2000;
}
return stepsThisWeek;
}

public int idleAlerts() {
anInt = hour;
if (anInt >= 06) {
return idleAlerts;
} else {
return 0;
}
}
public void getWatchData() {
System.out.println("Number of steps until: " + timeStamp + " is: " + stepsToday);
System.out.println("Calories burned: " + calories);
System.out.println("Distance today: " + unitConvertorForOneDay() + " " + distanceUom);
System.out.println("Distance this week: " + unitConvertorForOneWeek()+" " + distanceUom);
System.out.println("Current date: " + currentTime);
System.out.println("Number of idle alerts: " + idleAlerts());
}
}
5 changes: 5 additions & 0 deletions iulia/src/main/java/com/imalittletester/jam/ApricotJam.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@





12 changes: 12 additions & 0 deletions iulia/src/main/java/com/imalittletester/jam/Bottle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.imalittletester.jam;

public class Bottle {

public int bottleQty;
public int bottleCapacity;

public Bottle(int bottleQty, int bottleCapacity) {
this.bottleQty = bottleQty;
this.bottleCapacity = bottleCapacity;
}
}
Loading