From bc95a17ab6887e2e6755c47efe64deb57ecb64c1 Mon Sep 17 00:00:00 2001 From: Jimmy622 Date: Fri, 14 Jan 2022 14:45:27 +0530 Subject: [PATCH 1/8] Task 1, 2,3 commited --- .../solution/Question 1/question_1/.gitignore | 6 + .../Question 1/question_1/.vscode/launch.json | 13 + .../Question 1/question_1/CHANGELOG.md | 3 + .../solution/Question 1/question_1/README.md | 2 + .../question_1/analysis_options.yaml | 30 ++ .../Question 1/question_1/bin/question_1.dart | 45 +++ .../Question 1/question_1/lib/question_1.dart | 3 + .../Question 1/question_1/pubspec.lock | 341 ++++++++++++++++++ .../Question 1/question_1/pubspec.yaml | 15 + .../question_1/test/question_1_test.dart | 8 + .../solution/Question 2/question_2/.gitignore | 6 + .../Question 2/question_2/CHANGELOG.md | 3 + .../solution/Question 2/question_2/README.md | 2 + .../question_2/analysis_options.yaml | 30 ++ .../Question 2/question_2/bin/question_2.dart | 41 +++ .../Question 2/question_2/lib/question_2.dart | 3 + .../Question 2/question_2/pubspec.lock | 341 ++++++++++++++++++ .../Question 2/question_2/pubspec.yaml | 15 + .../question_2/test/question_2_test.dart | 8 + .../solution/Question 3/question_3/.gitignore | 6 + .../Question 3/question_3/CHANGELOG.md | 3 + .../solution/Question 3/question_3/README.md | 2 + .../question_3/analysis_options.yaml | 30 ++ .../Question 3/question_3/bin/question_3.dart | 44 +++ .../Question 3/question_3/lib/question_3.dart | 3 + .../Question 3/question_3/pubspec.lock | 341 ++++++++++++++++++ .../Question 3/question_3/pubspec.yaml | 15 + .../question_3/test/question_3_test.dart | 8 + 28 files changed, 1367 insertions(+) create mode 100644 session_1/solution/Question 1/question_1/.gitignore create mode 100644 session_1/solution/Question 1/question_1/.vscode/launch.json create mode 100644 session_1/solution/Question 1/question_1/CHANGELOG.md create mode 100644 session_1/solution/Question 1/question_1/README.md create mode 100644 session_1/solution/Question 1/question_1/analysis_options.yaml create mode 100644 session_1/solution/Question 1/question_1/bin/question_1.dart create mode 100644 session_1/solution/Question 1/question_1/lib/question_1.dart create mode 100644 session_1/solution/Question 1/question_1/pubspec.lock create mode 100644 session_1/solution/Question 1/question_1/pubspec.yaml create mode 100644 session_1/solution/Question 1/question_1/test/question_1_test.dart create mode 100644 session_1/solution/Question 2/question_2/.gitignore create mode 100644 session_1/solution/Question 2/question_2/CHANGELOG.md create mode 100644 session_1/solution/Question 2/question_2/README.md create mode 100644 session_1/solution/Question 2/question_2/analysis_options.yaml create mode 100644 session_1/solution/Question 2/question_2/bin/question_2.dart create mode 100644 session_1/solution/Question 2/question_2/lib/question_2.dart create mode 100644 session_1/solution/Question 2/question_2/pubspec.lock create mode 100644 session_1/solution/Question 2/question_2/pubspec.yaml create mode 100644 session_1/solution/Question 2/question_2/test/question_2_test.dart create mode 100644 session_1/solution/Question 3/question_3/.gitignore create mode 100644 session_1/solution/Question 3/question_3/CHANGELOG.md create mode 100644 session_1/solution/Question 3/question_3/README.md create mode 100644 session_1/solution/Question 3/question_3/analysis_options.yaml create mode 100644 session_1/solution/Question 3/question_3/bin/question_3.dart create mode 100644 session_1/solution/Question 3/question_3/lib/question_3.dart create mode 100644 session_1/solution/Question 3/question_3/pubspec.lock create mode 100644 session_1/solution/Question 3/question_3/pubspec.yaml create mode 100644 session_1/solution/Question 3/question_3/test/question_3_test.dart diff --git a/session_1/solution/Question 1/question_1/.gitignore b/session_1/solution/Question 1/question_1/.gitignore new file mode 100644 index 00000000..3c8a1572 --- /dev/null +++ b/session_1/solution/Question 1/question_1/.gitignore @@ -0,0 +1,6 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build output. +build/ diff --git a/session_1/solution/Question 1/question_1/.vscode/launch.json b/session_1/solution/Question 1/question_1/.vscode/launch.json new file mode 100644 index 00000000..9028f78a --- /dev/null +++ b/session_1/solution/Question 1/question_1/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "question_1", + "request": "launch", + "type": "dart" + } + ] +} \ No newline at end of file diff --git a/session_1/solution/Question 1/question_1/CHANGELOG.md b/session_1/solution/Question 1/question_1/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/session_1/solution/Question 1/question_1/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/session_1/solution/Question 1/question_1/README.md b/session_1/solution/Question 1/question_1/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/session_1/solution/Question 1/question_1/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/session_1/solution/Question 1/question_1/analysis_options.yaml b/session_1/solution/Question 1/question_1/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/session_1/solution/Question 1/question_1/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/session_1/solution/Question 1/question_1/bin/question_1.dart b/session_1/solution/Question 1/question_1/bin/question_1.dart new file mode 100644 index 00000000..120be47e --- /dev/null +++ b/session_1/solution/Question 1/question_1/bin/question_1.dart @@ -0,0 +1,45 @@ +// import 'package:question_1/question_1.dart' as question_1; +import 'dart:io'; + + +void fibonacci(int n){ + + if(n<=0){ + print("Entered numbered should be greater than zero"); + return; + } + + int f0=0,f1=1,result=0, count=0; + + if(n==1){ + print('0'); + return; + } + else{ + print('0'); + print('1'); + if(n==2){ + return; + } + } + count=2; + result = f0+f1; + + while(count=2.15.1 <3.0.0" diff --git a/session_1/solution/Question 1/question_1/pubspec.yaml b/session_1/solution/Question 1/question_1/pubspec.yaml new file mode 100644 index 00000000..56a55a58 --- /dev/null +++ b/session_1/solution/Question 1/question_1/pubspec.yaml @@ -0,0 +1,15 @@ +name: question_1 +description: A sample command-line application. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.15.1 <3.0.0' + + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + lints: ^1.0.0 + test: ^1.16.0 diff --git a/session_1/solution/Question 1/question_1/test/question_1_test.dart b/session_1/solution/Question 1/question_1/test/question_1_test.dart new file mode 100644 index 00000000..f07b33f7 --- /dev/null +++ b/session_1/solution/Question 1/question_1/test/question_1_test.dart @@ -0,0 +1,8 @@ +import 'package:question_1/question_1.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} diff --git a/session_1/solution/Question 2/question_2/.gitignore b/session_1/solution/Question 2/question_2/.gitignore new file mode 100644 index 00000000..3c8a1572 --- /dev/null +++ b/session_1/solution/Question 2/question_2/.gitignore @@ -0,0 +1,6 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build output. +build/ diff --git a/session_1/solution/Question 2/question_2/CHANGELOG.md b/session_1/solution/Question 2/question_2/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/session_1/solution/Question 2/question_2/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/session_1/solution/Question 2/question_2/README.md b/session_1/solution/Question 2/question_2/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/session_1/solution/Question 2/question_2/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/session_1/solution/Question 2/question_2/analysis_options.yaml b/session_1/solution/Question 2/question_2/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/session_1/solution/Question 2/question_2/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/session_1/solution/Question 2/question_2/bin/question_2.dart b/session_1/solution/Question 2/question_2/bin/question_2.dart new file mode 100644 index 00000000..16247384 --- /dev/null +++ b/session_1/solution/Question 2/question_2/bin/question_2.dart @@ -0,0 +1,41 @@ +import 'package:question_2/question_2.dart' as question_2; +import 'dart:io'; + +bool isPrime(int n){ + for(int i=2;i<=n/2;i++){ + if(n%i==0) return false; + } + return true; +} + +bool isSemiPrime(int n){ + int d1=0,d2=0; + + if(n<2) return false; + + for(int i=2;i<=n/2;i++){ + if(n%i==0){ + d1=i; + d2=n~/i; + break; + } + } + print('d1 = $d1'); + print('d2 = $d2'); + if(isPrime(d1)&&isPrime(d2)&&d1!=0){ + return true; + } + return false; +} + + + +void main() { + + print("Enter an integer to test for semiprime:"); + int? number = int.parse(stdin.readLineSync()!); + bool isSemi = isSemiPrime(number); + + print("The number $number is $isSemi"); + +} diff --git a/session_1/solution/Question 2/question_2/lib/question_2.dart b/session_1/solution/Question 2/question_2/lib/question_2.dart new file mode 100644 index 00000000..f64ad726 --- /dev/null +++ b/session_1/solution/Question 2/question_2/lib/question_2.dart @@ -0,0 +1,3 @@ +int calculate() { + return 6 * 7; +} diff --git a/session_1/solution/Question 2/question_2/pubspec.lock b/session_1/solution/Question 2/question_2/pubspec.lock new file mode 100644 index 00000000..a0170383 --- /dev/null +++ b/session_1/solution/Question 2/question_2/pubspec.lock @@ -0,0 +1,341 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "33.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.2" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.5" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3" + lints: + dependency: "direct dev" + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.1" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.10" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.2" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.20.1" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.9" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.11" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "8.1.0" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" +sdks: + dart: ">=2.15.1 <3.0.0" diff --git a/session_1/solution/Question 2/question_2/pubspec.yaml b/session_1/solution/Question 2/question_2/pubspec.yaml new file mode 100644 index 00000000..08a07a35 --- /dev/null +++ b/session_1/solution/Question 2/question_2/pubspec.yaml @@ -0,0 +1,15 @@ +name: question_2 +description: A sample command-line application. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.15.1 <3.0.0' + + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + lints: ^1.0.0 + test: ^1.16.0 diff --git a/session_1/solution/Question 2/question_2/test/question_2_test.dart b/session_1/solution/Question 2/question_2/test/question_2_test.dart new file mode 100644 index 00000000..1a24b047 --- /dev/null +++ b/session_1/solution/Question 2/question_2/test/question_2_test.dart @@ -0,0 +1,8 @@ +import 'package:question_2/question_2.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} diff --git a/session_1/solution/Question 3/question_3/.gitignore b/session_1/solution/Question 3/question_3/.gitignore new file mode 100644 index 00000000..3c8a1572 --- /dev/null +++ b/session_1/solution/Question 3/question_3/.gitignore @@ -0,0 +1,6 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build output. +build/ diff --git a/session_1/solution/Question 3/question_3/CHANGELOG.md b/session_1/solution/Question 3/question_3/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/session_1/solution/Question 3/question_3/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/session_1/solution/Question 3/question_3/README.md b/session_1/solution/Question 3/question_3/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/session_1/solution/Question 3/question_3/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/session_1/solution/Question 3/question_3/analysis_options.yaml b/session_1/solution/Question 3/question_3/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/session_1/solution/Question 3/question_3/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/session_1/solution/Question 3/question_3/bin/question_3.dart b/session_1/solution/Question 3/question_3/bin/question_3.dart new file mode 100644 index 00000000..745c4a52 --- /dev/null +++ b/session_1/solution/Question 3/question_3/bin/question_3.dart @@ -0,0 +1,44 @@ +// import 'package:question_3/question_3.dart' as question_3; +import 'dart:io'; + +bool isPrime(int n){ + + if(n<2) return false; + + for(int i=2;i<=n/2;i++){ + if(n%i==0) return false; + } + return true; +} + + +void main() { + + print("Enter the length of the array:"); + int? length = int.parse(stdin.readLineSync()!); + + var arr = List.filled(length, 0); + + print("Enter the elements of the array:"); + for(int i=0;i=2.15.1 <3.0.0" diff --git a/session_1/solution/Question 3/question_3/pubspec.yaml b/session_1/solution/Question 3/question_3/pubspec.yaml new file mode 100644 index 00000000..728164b5 --- /dev/null +++ b/session_1/solution/Question 3/question_3/pubspec.yaml @@ -0,0 +1,15 @@ +name: question_3 +description: A sample command-line application. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.15.1 <3.0.0' + + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + lints: ^1.0.0 + test: ^1.16.0 diff --git a/session_1/solution/Question 3/question_3/test/question_3_test.dart b/session_1/solution/Question 3/question_3/test/question_3_test.dart new file mode 100644 index 00000000..4e3b5956 --- /dev/null +++ b/session_1/solution/Question 3/question_3/test/question_3_test.dart @@ -0,0 +1,8 @@ +import 'package:question_3/question_3.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} From 70e238e5a5d37dce1eae2e0ebd3fb70f28dff1d4 Mon Sep 17 00:00:00 2001 From: Jimmy622 Date: Fri, 14 Jan 2022 15:54:22 +0530 Subject: [PATCH 2/8] Task 4 uploaded --- .../solution/Question 4/question_4/.gitignore | 6 + .../Question 4/question_4/CHANGELOG.md | 3 + .../solution/Question 4/question_4/README.md | 2 + .../question_4/analysis_options.yaml | 30 ++ .../Question 4/question_4/bin/question_4.dart | 123 +++++++ .../Question 4/question_4/lib/question_4.dart | 3 + .../Question 4/question_4/pubspec.lock | 341 ++++++++++++++++++ .../Question 4/question_4/pubspec.yaml | 15 + .../question_4/test/question_4_test.dart | 8 + 9 files changed, 531 insertions(+) create mode 100644 session_1/solution/Question 4/question_4/.gitignore create mode 100644 session_1/solution/Question 4/question_4/CHANGELOG.md create mode 100644 session_1/solution/Question 4/question_4/README.md create mode 100644 session_1/solution/Question 4/question_4/analysis_options.yaml create mode 100644 session_1/solution/Question 4/question_4/bin/question_4.dart create mode 100644 session_1/solution/Question 4/question_4/lib/question_4.dart create mode 100644 session_1/solution/Question 4/question_4/pubspec.lock create mode 100644 session_1/solution/Question 4/question_4/pubspec.yaml create mode 100644 session_1/solution/Question 4/question_4/test/question_4_test.dart diff --git a/session_1/solution/Question 4/question_4/.gitignore b/session_1/solution/Question 4/question_4/.gitignore new file mode 100644 index 00000000..3c8a1572 --- /dev/null +++ b/session_1/solution/Question 4/question_4/.gitignore @@ -0,0 +1,6 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build output. +build/ diff --git a/session_1/solution/Question 4/question_4/CHANGELOG.md b/session_1/solution/Question 4/question_4/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/session_1/solution/Question 4/question_4/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/session_1/solution/Question 4/question_4/README.md b/session_1/solution/Question 4/question_4/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/session_1/solution/Question 4/question_4/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/session_1/solution/Question 4/question_4/analysis_options.yaml b/session_1/solution/Question 4/question_4/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/session_1/solution/Question 4/question_4/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/session_1/solution/Question 4/question_4/bin/question_4.dart b/session_1/solution/Question 4/question_4/bin/question_4.dart new file mode 100644 index 00000000..092412a1 --- /dev/null +++ b/session_1/solution/Question 4/question_4/bin/question_4.dart @@ -0,0 +1,123 @@ +// import 'package:question_4/question_4.dart' as question_4; +// ignore_for_file: deprecated_member_use + +import 'dart:io'; + + +class BranchElective{ + + String courseName='a'; + String courseCode='a'; + String branch='a'; + int year=0; + + // BranchElective(String name, String code, String branch, int year){ + // courseCode = code; + // courseName = name; + // branch = branch; + // year = year; + // } + +} + +class OpenElectives{ + + String courseName='a'; + String courseCode='a'; + +} + + +void main() { + + var openarr = List.empty(growable: true); + var brancharr = List.empty(growable: true); + + while(true){ + + int choice; + print('Enter type of user 1. Admin 2. Student'); + + choice = int.parse(stdin.readLineSync()!); + + if(choice==1){ //Admin + + print('Enter course type 1.Open elective 2.Branch elective'); + int? choice2 = int.parse(stdin.readLineSync()!); + + if(choice2==1){ // Open Elective + + print('Enter course name and code:'); + String name,code; + name = stdin.readLineSync()!; + code = stdin.readLineSync()!; + + var temp = OpenElectives(); + temp.courseCode = code; + temp.courseName = name; + + openarr.add(temp); + } + + else{ + if(choice2==2){ //Branch Elective + + String name,code,branch; + int year; + print('Enter course code name, course code, branch and year'); + name = stdin.readLineSync()!; + code = stdin.readLineSync()!; + branch = stdin.readLineSync()!; + year = int.parse(stdin.readLineSync()!); + + var temp = BranchElective(); + temp.courseName = name; + temp.branch = branch; + temp.year = year; + temp.courseCode = code; + + } + else{ + return; + } + } + + } + + else{ + if(choice==2){ // Student + + String branch; + int year; + print('Enter branch and year'); + + branch = stdin.readLineSync()!; + year = int.parse(stdin.readLineSync()!); + + print(''); + + print('Course Name Course Code'); + for(int i=0;i'); + + for(int i=0;i=2.15.1 <3.0.0" diff --git a/session_1/solution/Question 4/question_4/pubspec.yaml b/session_1/solution/Question 4/question_4/pubspec.yaml new file mode 100644 index 00000000..9141367b --- /dev/null +++ b/session_1/solution/Question 4/question_4/pubspec.yaml @@ -0,0 +1,15 @@ +name: question_4 +description: A sample command-line application. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.15.1 <3.0.0' + + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + lints: ^1.0.0 + test: ^1.16.0 diff --git a/session_1/solution/Question 4/question_4/test/question_4_test.dart b/session_1/solution/Question 4/question_4/test/question_4_test.dart new file mode 100644 index 00000000..45014325 --- /dev/null +++ b/session_1/solution/Question 4/question_4/test/question_4_test.dart @@ -0,0 +1,8 @@ +import 'package:question_4/question_4.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} From b5c4e06c4068d4544e7e32b486c625d9cab41407 Mon Sep 17 00:00:00 2001 From: Jimmy622 Date: Fri, 21 Jan 2022 22:51:14 +0530 Subject: [PATCH 3/8] Trivia Application added --- .../assignment/trivia_application/.gitignore | 46 ++ .../assignment/trivia_application/.metadata | 10 + .../assignment/trivia_application/README.md | 16 + .../trivia_application/analysis_options.yaml | 29 ++ .../trivia_application/android/.gitignore | 13 + .../android/app/build.gradle | 68 +++ .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 34 ++ .../trivia_application/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 4663 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2786 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 7030 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 13178 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 20613 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + .../trivia_application/android/build.gradle | 31 ++ .../android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 6 + .../android/settings.gradle | 11 + .../trivia_application/ios/.gitignore | 34 ++ .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 481 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 ++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 1 + .../AppIcon.appiconset/_/1024.png | Bin 0 -> 219208 bytes .../AppIcon.appiconset/_/114.png | Bin 0 -> 9173 bytes .../AppIcon.appiconset/_/120.png | Bin 0 -> 9921 bytes .../AppIcon.appiconset/_/180.png | Bin 0 -> 18736 bytes .../AppIcon.appiconset/_/29.png | Bin 0 -> 1808 bytes .../AppIcon.appiconset/_/40.png | Bin 0 -> 2313 bytes .../AppIcon.appiconset/_/57.png | Bin 0 -> 3456 bytes .../AppIcon.appiconset/_/58.png | Bin 0 -> 3590 bytes .../AppIcon.appiconset/_/60.png | Bin 0 -> 3786 bytes .../AppIcon.appiconset/_/80.png | Bin 0 -> 5511 bytes .../AppIcon.appiconset/_/87.png | Bin 0 -> 6170 bytes .../Runner/Base.lproj/LaunchScreen.storyboard | 37 ++ .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../trivia_application/ios/Runner/Info.plist | 47 ++ .../ios/Runner/Runner-Bridging-Header.h | 1 + .../trivia_application/lib/main.dart | 218 ++++++++ .../lib/new_user_screent.dart | 238 +++++++++ .../trivia_application/pubspec.yaml | 90 ++++ .../trivia_application/test/widget_test.dart | 30 ++ .../trivia_application/web/favicon.png | Bin 0 -> 917 bytes .../trivia_application/web/icons/Icon-192.png | Bin 0 -> 5292 bytes .../trivia_application/web/icons/Icon-512.png | Bin 0 -> 8252 bytes .../web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes .../trivia_application/web/index.html | 104 ++++ .../trivia_application/web/manifest.json | 35 ++ session_3/code/networking_app/lib/main.dart | 2 +- 64 files changed, 1864 insertions(+), 1 deletion(-) create mode 100644 session_3/assignment/trivia_application/.gitignore create mode 100644 session_3/assignment/trivia_application/.metadata create mode 100644 session_3/assignment/trivia_application/README.md create mode 100644 session_3/assignment/trivia_application/analysis_options.yaml create mode 100644 session_3/assignment/trivia_application/android/.gitignore create mode 100644 session_3/assignment/trivia_application/android/app/build.gradle create mode 100644 session_3/assignment/trivia_application/android/app/src/debug/AndroidManifest.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/main/AndroidManifest.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/main/kotlin/com/example/trivia_application/MainActivity.kt create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/drawable/launch_background.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/values-night/styles.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/main/res/values/styles.xml create mode 100644 session_3/assignment/trivia_application/android/app/src/profile/AndroidManifest.xml create mode 100644 session_3/assignment/trivia_application/android/build.gradle create mode 100644 session_3/assignment/trivia_application/android/gradle.properties create mode 100644 session_3/assignment/trivia_application/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 session_3/assignment/trivia_application/android/settings.gradle create mode 100644 session_3/assignment/trivia_application/ios/.gitignore create mode 100644 session_3/assignment/trivia_application/ios/Flutter/AppFrameworkInfo.plist create mode 100644 session_3/assignment/trivia_application/ios/Flutter/Debug.xcconfig create mode 100644 session_3/assignment/trivia_application/ios/Flutter/Release.xcconfig create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcodeproj/project.pbxproj create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 session_3/assignment/trivia_application/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 session_3/assignment/trivia_application/ios/Runner/AppDelegate.swift create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png create mode 100644 session_3/assignment/trivia_application/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 session_3/assignment/trivia_application/ios/Runner/Base.lproj/Main.storyboard create mode 100644 session_3/assignment/trivia_application/ios/Runner/Info.plist create mode 100644 session_3/assignment/trivia_application/ios/Runner/Runner-Bridging-Header.h create mode 100644 session_3/assignment/trivia_application/lib/main.dart create mode 100644 session_3/assignment/trivia_application/lib/new_user_screent.dart create mode 100644 session_3/assignment/trivia_application/pubspec.yaml create mode 100644 session_3/assignment/trivia_application/test/widget_test.dart create mode 100644 session_3/assignment/trivia_application/web/favicon.png create mode 100644 session_3/assignment/trivia_application/web/icons/Icon-192.png create mode 100644 session_3/assignment/trivia_application/web/icons/Icon-512.png create mode 100644 session_3/assignment/trivia_application/web/icons/Icon-maskable-192.png create mode 100644 session_3/assignment/trivia_application/web/icons/Icon-maskable-512.png create mode 100644 session_3/assignment/trivia_application/web/index.html create mode 100644 session_3/assignment/trivia_application/web/manifest.json diff --git a/session_3/assignment/trivia_application/.gitignore b/session_3/assignment/trivia_application/.gitignore new file mode 100644 index 00000000..0fa6b675 --- /dev/null +++ b/session_3/assignment/trivia_application/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/session_3/assignment/trivia_application/.metadata b/session_3/assignment/trivia_application/.metadata new file mode 100644 index 00000000..fd70cabc --- /dev/null +++ b/session_3/assignment/trivia_application/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b + channel: stable + +project_type: app diff --git a/session_3/assignment/trivia_application/README.md b/session_3/assignment/trivia_application/README.md new file mode 100644 index 00000000..cb192a05 --- /dev/null +++ b/session_3/assignment/trivia_application/README.md @@ -0,0 +1,16 @@ +# trivia_application + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/session_3/assignment/trivia_application/analysis_options.yaml b/session_3/assignment/trivia_application/analysis_options.yaml new file mode 100644 index 00000000..61b6c4de --- /dev/null +++ b/session_3/assignment/trivia_application/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/session_3/assignment/trivia_application/android/.gitignore b/session_3/assignment/trivia_application/android/.gitignore new file mode 100644 index 00000000..6f568019 --- /dev/null +++ b/session_3/assignment/trivia_application/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/session_3/assignment/trivia_application/android/app/build.gradle b/session_3/assignment/trivia_application/android/app/build.gradle new file mode 100644 index 00000000..d405e401 --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/build.gradle @@ -0,0 +1,68 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.trivia_application" + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/session_3/assignment/trivia_application/android/app/src/debug/AndroidManifest.xml b/session_3/assignment/trivia_application/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..d4cfaecd --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/session_3/assignment/trivia_application/android/app/src/main/AndroidManifest.xml b/session_3/assignment/trivia_application/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..463bf8ab --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/session_3/assignment/trivia_application/android/app/src/main/kotlin/com/example/trivia_application/MainActivity.kt b/session_3/assignment/trivia_application/android/app/src/main/kotlin/com/example/trivia_application/MainActivity.kt new file mode 100644 index 00000000..e0bf9082 --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/src/main/kotlin/com/example/trivia_application/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.trivia_application + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/session_3/assignment/trivia_application/android/app/src/main/res/drawable-v21/launch_background.xml b/session_3/assignment/trivia_application/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/session_3/assignment/trivia_application/android/app/src/main/res/drawable/launch_background.xml b/session_3/assignment/trivia_application/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/session_3/assignment/trivia_application/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a078580acc51e02ac0c5553f52d98fc42840a19d GIT binary patch literal 4663 zcmb`KcQjnz_Q3BDqIaX02#FGc=plq)Mh%H*A!@Xl=%Pyy;%kKHHAIyZ%t>62t_s4tttaH!j?!C`G`|NY?y6c`!p3VYHdOA=Y00aU6 z5UByDb7Z1WEv*N)O^tP+2HJl&kZ}SeIVTMO@JD_=rn;Jf7M50mXSzSd-qF|VPyQDp zDemsqv*-XYCiySy|4v2iVeeRlSk$ehB zEb8)4?C?+g*w4$4{XC7hnKWZPf~LMV1P3q2ta{HfFmG9B3VEhkO34< zaex--@%Yc=EXaQrfi(N{Bfv}rKmZ6ih#4Sb29Yy^PCEcTQZ>lP$U%SZpEOca(NLZT zouj27nI)J2&^eNo40P^)yeP=ek*s7?)Bp_&GaLH_RjvjM^7QQn6qkRVDBfC@lA2*KQZn< z(6|-CR`=o-OK*PTW`+U%ik!_&tPiNcoEqkz=5nVRhE%`WE}_70y6$drYxfk`G&FxS z6}p=1==AOzaSZqvq`&rd!Pt_QhnaR%VBZvG-~X_1E>DCz#Kd_%He?aJo|L2JWmSov z>p!6%ajyHR_y}w!j4MFnRuNJ2u0K(`l{3{oQC*%qg+Gdrs7v2#k!aSo%ISI=$$DtO zY6+%X@V)g$a_@S1+$JWg%ZD%VtPtLq$qBBZh6*sl-0?Kc2o!p%^tZ@(2^jRbJAI}kGqfjc*Q$W6@Dv!8q_f#?Mi}PD?6WgsDO;qo$W$Zb6X)(e{(E_G`k;`{En;BQ zrIGdxT(1{L`SR78#23?h0uDBNmQff4JCodGgBd+<5|$;Fo`&&O%Dv)oyWVJ1A;)_g z%+O`!3Z%+?>-Bnm!yMhpX+;QEEaNVP^UQSZZDOVBkcPsChBj7dy1UgE;ESMiY7s>i zS#FIxO3@{7?_GET2`4#rqmE~Dj)<&qQcOPe~#NM=Sai@#qvA>xDy#ifQzh83bBz6iAleW9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RU5G-R^ck@TS^KA1CF<=)=kMukJMLRF;J%Qjg@i-cvzO z>QcPYm$GM+b300%=rX6zwtIExnJ_l)i4(MhOJigb?h`nNrYL!O9_Wp{Eb4(A2~_>M z%#+G)XVggO;ntED{6#U1|%`YRMrO%dP>sL>mK%()&3t1K(uq z>y--V`;@4$mD<4-wELF|tkDY#1vQZGEl$^h?9IMGk;(F=6Vxzwy}R)pIV(8|IT(jz O$vf1BTZ~Unr~U>_ALE|@ literal 0 HcmV?d00001 diff --git a/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..690ad6690b767d82a8470e64af417f34f6bdd5e9 GIT binary patch literal 2786 zcmb`Gc{tST9>Cu*h%AvM$+5(hEZLJi<{IWW$|#wkQFbQ`jZxW`I@Jtg83&OqOZKI) zMUsP%;~X4~iLxYXXfUQoaes5p)6==nJ@>hPocn#B_xFCD@BV#%zu)eQ-6xT z6UzI3gp(bBVU54A|1TB4r&q8Cyd zK7V5OKk-#!5E1g}<@kF95jgw`Vv_*>5Kb+Qa5@(B!aJUUP7JhVKrnCs*1!_t|Eqkx z&%gozPOt%hCx6wsX9Cdl0{~KEUv*0P0PMQ~K;uA=8^P`OX1Jjzm$x?n>m>jPVF3^u z1Yobrmqx$Fetj4JWmb78Mh2QQ5L!OKA9w+IfC6~n0ggeW1GIoPIKKN5AfV6V?+GW# z-^&0+@3sR`KBy@zI7}39iNfHbu-z^o3*82c8xH$2KLC9EdjS{k9vEDJ8?ql20l%BM zU_5{e&hg@bb3;}xK7Jr7ws*g{go31$1=vG732(*cHkun_>JWtnb&h)MBxsaZNZxFsp`U#H1j4K4_~%<<0)nK12A4x0Y~E zPvCQgQ^+NUmVHAq?alDg@|dTtGHJHG)3lQ1b7+ld?uvj1W)XDf#=ayxxvzJrb0!^c zr6)@zwRSrvC*0bz^33(tT3$$cBVyfg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O4Bw^A zV}#4SC*AXnoRT&`|bBhB3jdsNP zNg)1FU{3C6nAHG^HM=H2k6D;l+F#}q!4MCUs9Wl zc_}t+ym68;eCNmHj$)m1@}uB{w?lREoAFzrA1fopyBnGUHk{M+)%^q-(|NLRY5BgH zvElhN<0dsMA^yPFulja&8#wv(Y;9SVk((*0b~50bg8eD$YF)Cf>#kB;%L-T1Cz0R9 z83=f8n6$cB%*)+I5na6{Tzisn+hNnqbk-GST2h_z*=9ynrg54LB^o19n@r4u?~eWp Ductca literal 0 HcmV?d00001 diff --git a/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/session_3/assignment/trivia_application/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..be32c6d98f3ed67362b4af91924cce4c505fc53a GIT binary patch literal 7030 zcmb_>byQrzlJ`Y|1Sdg*1syb42G_v}?yiFm?ivUL2p-%Wg1bW?K!)J%lHdUX1P{KG z-F@f1J-d6pKlZCWb^CX#tE;Q4<=pQ3xbXM`z*mrwmjRHF000S*fX5AFkURupqN=VU zBmYMF-wTjQ0R*9P0szd>-Bn#yl15igpXRUZA7p0X=KK%*Kja9zmveuu1Hd%<|4{z_ z5@A|G-7FAFzY*;2ifA0+tR(_JxBd_8{TG}62af)WT{YDq2%S6x23h|LHvbpw z0F?ND%FNRNpd}0dNSFR8qt62XyifpW9(Oi#HT!pGP!UgLD=PpvEd>A^Jpgz%0RT@8 z{^969>;7{r{+GVeAnH&c`ssv7)_?;51!w?yz!9(jI1q>%-~_k;@Z&N7K}?VT8~ru% zf3tw7{n!H#U;w6oDGCw+fJ}gdLV)zx4^Shbfglv5e*^##3=B+kEF?5!6x1gO1rB@w z2^9sw$jAsrL8v`Jl%OG@V_*VL2?(D(CwfUtLQBU*uV&^FjL?7ncai*8`YR>)@6sgz z8__H>0SW;i1_Z^4`=U%xy*)?I6G8fk_g`KlHk0!O{-{q!?>^KeTab-E0_o%9d7B)3 z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