WEBVTT

00:00.080 --> 00:00.920
Welcome back.

00:01.120 --> 00:07.120
Our Android app should allow the user to enter those parameters.

00:07.120 --> 00:08.160
Cylinders.

00:08.160 --> 00:09.400
Displacement.

00:09.440 --> 00:10.360
Horsepower.

00:10.400 --> 00:11.000
Weight.

00:11.000 --> 00:11.920
Acceleration.

00:11.920 --> 00:12.400
Model.

00:12.440 --> 00:12.880
Year.

00:13.000 --> 00:15.760
Origin one, two and three.

00:15.760 --> 00:21.680
So we're going to design a data class that contains all those parameters.

00:21.920 --> 00:30.000
And from this data class we need to store the results and the input from the user in order to pass it

00:30.000 --> 00:33.200
to our TensorFlow Lite model.

00:33.200 --> 00:44.200
For this, create a new package, name it as data, and inside this data create a new Kotlin class named

00:44.200 --> 00:46.960
as Car Features.

00:46.960 --> 00:49.800
Make it as data class.

00:49.840 --> 00:58.520
Okay, inside this data class car features start creating the variables val cylinders.

00:58.520 --> 01:00.520
It's of type float.

01:01.600 --> 01:04.800
Displacement equals to float.

01:04.800 --> 01:08.920
150 horsepower 100 f.

01:09.120 --> 01:11.560
Weight 3000 f.

01:11.680 --> 01:13.160
Also, it's a float.

01:13.200 --> 01:15.080
Acceleration float.

01:15.120 --> 01:16.360
Make it 15.

01:16.360 --> 01:21.000
And the model year, which is 76.

01:21.040 --> 01:25.360
For example, origin one, which is one f.

01:25.640 --> 01:32.720
This is American, origin two European, and the third origin is Japanese.

01:32.920 --> 01:39.680
So those are the features cylinders, displacement, horsepower, weight, acceleration, model year

01:39.680 --> 01:40.760
and the origins.

01:40.880 --> 01:44.480
And those are the default values of them.

01:44.520 --> 01:55.040
If the user didn't specify them and I made them just for helping the user to select uh and take uh like

01:55.080 --> 01:58.160
a quick overview about the numbers.

01:58.160 --> 02:02.760
So he should not specify the number of cylinders like 100.

02:02.760 --> 02:08.000
So it would be close to two for the displacement, the horsepower and so on.

02:08.120 --> 02:08.720
Okay.

02:08.760 --> 02:15.320
Let me create another data class named as Validate results.

02:15.480 --> 02:17.720
Val is valid.

02:17.840 --> 02:21.840
It's of type boolean and val error.

02:22.040 --> 02:26.280
List of string equals to empty list.

02:26.280 --> 02:31.680
So in this video we created those data classes for car features.

02:31.680 --> 02:34.800
And we specified the nine parameters.

02:34.800 --> 02:42.600
And the data class validate results that would be used in order to check the validation of the results,

02:42.600 --> 02:51.080
and going to check that for errors and display a list of errors if there are any new errors.
