Website Design Question
College of Computing and Informatics Assignment 2 Deadline: Day 05 / 05 /2024 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ### ID: ### CRN: ### Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format. • It is your responsibility to check and make sure that you have uploaded both the correct files. • Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation). • Email submission will not be accepted. • You are advised to make your work clear and well-presented. This includes filling your information on the cover page. • You must use this template, failing which will result in zero mark. • You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question. • Late submission will result in ZERO mark. • The work should be your own, copying from students or other resources will result in ZERO mark. • Use Times New Roman font for all your answers. Restricted – مقيد Question One Pg. 01 Learning Outcome(s): Describe technologies that enable the development of applications for mobile devices. Question One Complete the code below to create React components named Department and Courses. Replace any unnecessary statements with relevant ones to achieve the desired output shown in the given screenshot. Department.js export default class Department extends Component { render() { return( Information Tecnology {this.props.children} ); }} Courses.js export default class Courses extends Component { render() { return(); }} React app import React from “react”; import { render } from “react-dom”; const courses = ‘IT 448 , IT 487, IT233 ‘; render( < Department > < Courses> {courses} < /Courses> , document.getElementById(“root”) ); The output Restricted – مقيد 2Marks Question Two Pg. 02 Learning Outcome(s): Design application interfaces for mobile devices using appropriate software. Question Two 3 Marks Rewrite the code for the second question in assignment 1, with the main difference being the implementation of two activities: 1. The first activity should prompt the user to enter basic registration information. After the user clicks the ‘Register’ button, the app should pass some basic information (first name, last name, city, and ID) to the second activity along with a welcome message. 2. The second activity should display the information passed from the first activity. • HINT: Ensure your answer includes at least two different screenshots of the app’s layout after you run it. Fill in the form with your personal information. Include only the code from the Java files (XML files are not required). Failure to follow these instructions will result in a zero for this question. Restricted – مقيد Question Three Pg. 03 Learning Outcome(s): Design application interfaces for mobile devices using appropriate software. Question Three 3 Marks Find and correct the errors in the following code which is responsible for creating a dialog window. Include the corrected code in your answer. Dialog.java public class Dialog extends AppCompatActivity { @Override public Dialog onCreate (Bundle savedInstanceState) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); builder.setMessage(“Are you sure,You want to exit”); alertDialogBuilder.setPositiveButton(“Yes”, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog1, int id) { finish(); } }); alertDialogBuilder.setNegativeButton(“No”, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog2, int which) { Toast.makeText(MainActivity.this,”You clicked over No”,Toast.LENGTH_SHORT).show(); }}); return builder.create(); }} Restricted – مقيد Question Three Pg. 04 MainActivity.java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button close = (Button) findViewById(R.id.button); close.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { MyDialog myDialog = new MyDialog(); myDialog.show(getSupportFragmentManager(), “123”); } } ); } Restricted – مقيد
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.