Ads Here

Wednesday, June 29, 2022

.NET ASA Scenarios AD Questions and answers

 Scenarios in this page –

1.COVIDSHIELD

2.Acc Corp (100000 AND 50000)

3.TechSoft(e-learning)

4.Holiday Planners Hotel(pdf2)

5.Holiday Planners Hotel(pdf3)

6.ADV ADVENTURE COMPANY

7.Doctor appointment booking

I. 11thJan (Covidshield)

1. Validated for 0,1,2 (“Member Details”): B. [Range(0,2)]

2. Developers want to display Date and Time….. : B. RedirectResult

3. Covishield: A

var customer = from m in entities .memberdetails where m.VaccineName == “Covishield”

m.Gender == “Male” select m;

4. ShowAllDetails() : C. MemberID is set as Primary Key in the table.

5. MemberDetails table: A

CREATE TABLE MemberVaccinationDetails(

MemberId int IDENTITY (102,1) PRIMARY KEY,

MemberName varchar (250) Not NULL,

Gender varchar (6) Not Null CHECK (Gender in (‘Female’, ‘Male’, ‘Other’));

VaccinatedDate date Not NULL

DoseCount in Not NULL

VacacineName varchar (50) Not Null, CHECK(VaccinanName in(‘Covishield’, ‘Covaxine’));

VaccineCenter varchar (50) Not NULL.

AmountPaid int NULL)

6. Application should have same look and feel with outline as well: D. All of the given choices

7. Modify Member Details: A

1.Controller code

ViewBag.SaveMessage= “Save Successful”;

2.View Code

@ViewBag .SaveMessage

8. To handle error.., in MVC application : A and C

A. Controller code

[HandleError(View= “Error”)]

C. Web.Config code

<customErrors mode= “On”/>

9. AmountPaid Property: B. public Nullable<int> AmountPaid {get;set;}

10. Data from controller to View no type casting required: A. ViewBag

II. Acc Corp (100000 AND 50000) (19 pages)

1. POST functionality of the login action: C

public ActionResult Login(EmployeeModel employee)

2. Developer has to create a library with Repository class for database operations: B. 3

Entity Classes 1 Context Class

3. Employee Name: Rahul Ajay

Employee ID: 1241

Coverage: Rs. 200000

Valid Till: 30 May 2022

C. Details

4. Employee ID: 1241

Coverage: Rs. 200000

Valid Till: 30 May 2022 A. EmployeeInsaurance

5.Developer has to retrieve the employee name, in case employee login is successful and

display a welcome message with the name of logged in employee. D. The described

approach is wrong because ViewBag lifetime is for the current request only. Use Session

Instead

6. Login Action in the LoginController class: D. by changing defaults in the

App_Start/RoutConfig.cs file

7. A file named “Master.cshtml” contains the header, footer and CSS references: B. In the

_ViewStart.cshtml file,set Layout property to the path of the Master.cshtml file.

8. To redirect the user to Error view(Error.cshtml) : A. [HandleError(View= “Error”)]

9. The image shows the navigation in the MVC app, for the Home, ViewCoverage … : A

For Home/View:

1.public ActionResult Home()

For Coverage/ViewCoverage:

1.public ActionResult ViewCoverage(string empid)

For Coverage/UpdatCoverage:

1.public ActionResult Update (string empId)

10. Which of the following classes will best match the class generated by entity framework

for Employee table: D. Insaurance {get;set;} ans is long

III. Holiday Planners Hotel(pdf2)

1. Choose the correct EF query to search customer having address as Mumbai: A. var

customer = from c in entities.customerdetails where c.CustomerAddress == “Mumbai”

select c;

2. “RemoveCustomer” coding question: A. [HttpPost ActionName(“RemoveCustomer”)]

3. Thisrequest has been blocked because sensitive information could be disclosed to

third party websites: C. JsonRequestBehavior.AllowGet

4. Which file is used to set common layout across all views: A.ViewStart.cshtml

5. Email Address property of the AdminModelClass.cs, the developer needs to ensure ,

the value cannot be empty and it must satisfy the email format: A and B [Required]

and [DataType(DataType.EmailAddress)]

6. Image is available in this question about Model Contents: A. EF Designer from

Database

7. Update Profile: AdminId, AdminFirstName ….. : D. Edit

8. Register Admin: AdminFirstName, AdminLastName …..: A. RedirectToAction(“Login”);

9. Admin Login : B. (Datatype.Password)

10. AdminDetails(Table is given): A.

create table AdminDetails(AdminID int identity(10,1)primary key,

AdminFullName varchar(50) not null,

AdminEmailID varchar(50) unique,

AdminPassword varchar(10)not null)

IV. TechSoft(e-learning)

1. On submitting the register page validation error must be : B. [Required (Error message=

“Full name is Mandatory”)]

2. Login link on the Register view redirect user to the login view of Login Controller: B.

Html.ActionLink(“Login”, “Login”)

3. Select correct attribute to be added to the Email Property of Model class: D. [DataType

(Data Type. EmailAddress. ErrorMessage = “Invalid Email”)]

4. Login Screenshot is available (2 options are available): public ActionResult Login

(UserModel user)

5. To redirect user to Error view (Error.cshtml)…: A. [Handle error (View = “Error”)]

6. Successful registration, the user must be redirected to Login Page with Username…..: D.

TempData[“username”] = moduser. Email

7. When user login is successful the user must be redirected to Course List view which lists

out all the courses and on failed login a message must be displayed to the user on the

same Login view.: B and C. ViewResult and ActionResult

8. Create Login Page Template: B. Create

9.class Repository (Program): B and C

B. (from i in db.EUsers where i.Email == email && i.Password == pass select i);

C. db.EUsers Where (i=> i.Email == email && i.Password == pass). Select(j=> j) ;

10.Login action method: C.

routes.MapRoute(

name : “Default”,

url: “{controller}/{action}/{id}”,

defaults: new {controller = “Login” , action = “Login” ,id = UrlParameter.Optional}

);

Answers:( According to group people)

1. Datatype.password

2. Admintable query: option a with int identity (10,1) primary

key

3. multiple choice: (a) Required and (b)

Datatype(Datatype.emailaddress)

4. Update profile in screenshot; answer is edit

5. which approach? ans is EF designer from database

6. JSONRequestbehavior.allowget

7.HttpPost.ActionName("Remove customer")

8.Mumbai question: option A

9.Viewstart.cshtml

10. RedirectToAction("login")

I. TechSoft(e-learning)

1. [Required (Error message= “Full name is Mandatory”)]

2. Register (Login Controller): B. Html.ActionLink(“Login”, “Login”)

3. [DataType (Data Type. EmailAddress. ErrorMessage = “Invalid Error”)]

4. public ActionResult Login (UserModel user)

5. To redirect user to Error view (Error.cshtml)…: A. [Handle error (View = “Error”)]

6. Successful registration, the user must be redirected to Login Page with Username…..: D.

TempData[“username”] = moduser. Email

7. Multiple choices: ActionResult and ViewResult

8. Multiple choices (queries): Both the long queries are correct

9. Create Login Page Template: B. Create

10. Login login For Route

II. 11thJan -COVIDSHIELD

1. Validated for 0,1,2 (“Member Details”): B. [Range(0,2)]

2. Developers want to display Date and Time….. : C. ContentResult/ B. RedirectResult

3. Covishield: A

var customer = from m in entities .memberdetails where m.VaccineName == “Covishield”

m.Gender == “Male” select m;

4. ShowAllDetails() : C. MemberID is set as Primary Key in the table.

5. MemberDetailstable: A

CREATE TABLE MemberVaccinationDetails(

MemberId int IDENTITY (102,1) PRIMARY KEY,

MemberName varchar (250) Not NULL,

Gender varchar (6) Not Null CHECK (Gender in (‘Female’, ‘Male’, ‘Other’));

VaccinatedDate date Not NULL

DoseCount in Not NULL

VacacineName varchar (50) Not Null, CHECK(VaccinanName in(‘Covishield’, ‘Covaxine’));

VaccineCenter varchar (50) Not NULL.

AmountPaid int NULL)

6. Application should have some look and feel with outline as well: D. All of the given choices

7. Modify Member Details: A

1.Controller code

ViewBag.SaveMessage= “Save Successful”;

2.View Code

@ViewBag .SaveMessage

8. To handle error.., in MVC application : A and C

A. Controller code

[HandleError(View= “Error”)]

C. WebConfig code

<customErrors mode= :On”/>

9. AmountPaid Property: B. public Nullable<int> AmountPaid {get;set;}

10. Data from controller to View no type casting required: A. ViewBag

III. Acc Corp (100000 AND 50000) (19 pages)

1. POST functionality of the login action: C

public ActionResult Login(EmployeeModel employee)

2. Developer has to create a library with Repository class for database operations: B. 3

Entity Classes 1 Context Class

3. Employee Name: Rahul Ajay

Employee ID: 1241

Coverage: Rs. 200000

Valid Till: 30 May 2022

C. Details

4. Employee ID: 1241

Coverage: Rs. 200000

Valid Till: 30 May 2022 A. EmployeeInsaurance

5.Developer has to retrieve the employee name , in case employee login is successful and

display a welcome message with the name of logged in employee. D. Use Session Instead (at

last is right)

6. Login Action in the LoginController class: D. by changing defaults in the

App_Start/RoutConfig.cs file

7. A file named “Master.cshtml” containsthe header, footer and CSS references: B. In the

_ViewStart.cshtml file,set Layout property to the path of the Master.cshtml file.

8. To redirect the user to Error view(Error.cshtml) : A. [HandleError(View= “Error”)]

9. The image shows the navigation in the MVC app, for the Home, ViewCoverage … : C/D

10. Which of the following classes will best match the class generated by entity framework

for Employee table: D.

IV. Holiday Planners Hotel(pdf2)

1. Choose the correct EF query to search customer having address as Mumbai: A. var

customer = from c in entities.customerdetails where c.CustomerAddress == “Mumbai”

select c;

2. “RemoveCustomer” coding question: A. [HttpPost ActionName(“RemoveCustomer”)]

3. This request has been blocked because sensitive information could be disclosed to

third party websites: C. JsonRequestBehavior.AllowGet

4. Which file is used to set common layout across all views: A.ViewStart.cshtml

5. Email Address property of the AdminModelClass.cs, the developer needs to ensure ,

the value cannot be empty and it must satisfy the email format: A and B [Required]

and [DataType(DataType.EmailAddress)]

6. Image is available in this question about Model Contents: A. EF Designer from

Database

7. Update Profile: AdminId, AdminFirstName ….. : D. Edit

8. Register Admin: AdminFirstName, AdminLastName …..: A. RedirectToAction(“Login”);

9. Admin Login : B. (Datatype.Password)

10. AdminDetails(Table is given): A.

create table AdminDetails(AdminID int identity(10,1)primary key,

AdminFullName varchar(50) not null,

AdminEmailID varchar(50) unique,

AdminPassword varchar(10)not null)

V. Holiday Planners Hotel(pdf3)

1. Login action method: C.

routes.MapRoute(

name : “Default”,

url: “{controller}/{action}/{id}”,

defaults: new {controller = “Login” , action = “Login” ,id = UrlParameter.Optional}

);

2. Successful registration, the user must be redirected to Login Page with Username…..: D.

TempData [“username”]=moduser.Email;

3. Login: B. public ActionResult Login(UserModel user)

4. Select the correct attribute to be Email property of Model class to validate the correct

email format and display the error message, (Register): D.

[DataType(DataType.EmailAddress.ErrorMessage = “Invalid Email”)]

5. When user login is successful the user must be redirected to Course List view which lists

out all the courses and on failed login a message must be displayed to the user on the

same Login view.: B and C. ViewResult and ActionResult

6. class Repository (Program): B and C

B. (from i in db.EUsers where i.Email == email && i.Password == pass select i);

C. db.EUsers Where (i=> i.Email == email && i.Password == pass). Select(j=> j) ;

SCENARIO EXAM

SCENARIO-1 [ ADV ADVENTURE COMPANY]

Before moving on to next section to view the MCQ questions, please record your declaration (Yes or No)

in the text box that you have completely read the scenario.

An ADV adventure company provides travel experience and solutions for the customer around the

world. Its objective is to provide more enhanced support for the interest. For this to happen, company

want to provide a more interactive and easy methods of selecting the available option through an

automated application.

The application should be built with the following business scenarios:

1) Customer performs a purchase by selecting a package

2) Discount offers are provided based on each package

3) Once the purchase is made, an intimation mail is sent to the agency for confirmation

4) The agency will approve the request by verifying the customer and package details based on the

availability.

The following requirements must be implemented for developing the application:

1) Create a Data model with appropriate relationship to capture:

Customer details

Package tour details

Booking for a package by a customer

Trip details

2) Create appropriate profiles, users by understanding the scenario and define the permissions and

settings of OWD.

3) Create a workflow or process builder to send an email to the agency once the purchase record is

created.

4) Create a vf page to display all the bookings of a customer using standard controller

5) Create an apex class which should return all bookings of customer.

Questions:

1) A visualforce page uses the booking object as a standard controller. Customer object is a parent

of booking object. How can a developer display the name field rule of parent customer record

on the page?

A. Use the SOQL syntax to find the related customer field

B. Use additional apex logic when the controller to query for the name field

C. Use the (!booking c customer c_rName) merge field syntax

D. Use an additional standard controller for customer

2) In the company there are various levels of users according to their functional role. How the

admin should be able to create users with levels?

SCENARIO EXAM

A. Organization wide default

B. Role hierarchy

C. Profile

D. Sharing rule

3) After booking a travel package by a customer, the customized package has to be observed and

approved by the seniors of the company. How this could implemented?

A. Workflow

B. Profile

C. Approval process

D. Flow builder

4) A developer is tasked with creating a scheme to track customer, package and booking details a

single customer can have many bookings and single package can have many bookings. Each

booking is owned and managed by a single user. Which scheme builder should be created to

enable users to easily manage the bookings they own, without requiring the access to the

customer of the package records?

A. A lookup relationship to the customer object and a lookup relationship to the package

object

B. A lookup relationship to the customer object and a master detailed relationship to the

package object.

C. A master detailed relationship to the customer object and a master detailed relationship

to the package object.

D. A master detailed relationship to the customer object and a lookup relationship to the

package object

5) Which type of controller should a developer use to display all the records for a custom object

booking on a visualforce page?

A. Standard controller

B. List controller

C. Custom list controller

D. No controller required

6) A developer wants to apply custom styling in a visualforce page? which of the three options can

be used?

A. Inline CSS

B. A static resource

C. <apex:stylesheets> tag

D. <apex:stylesheet> tag

SCENARIO EXAM

7) A unit test is written by a developer for an apex class method which returns all the Atlanta city

customer records. What are the 2 ways for a developer to execute tests in an org (choose 2)?

A. Bulk API

B. Developer console

C. Setup menu

D. Metadata API

8) A developer wants to override a new button using visualforce page which created booking

object records. What should be used in the vf page to implement this? [B OR D]

A. The object record must be ……controller

B. The standard controller attribute must be set to the booking object

C. The action attribute must be set to a controller method

D. The controller or extension must have a pageReference method

9) A customer will book a travel package.an email notification will be send to a system admin after

booking. Which feature of automation should be used to implement this functionality?

A. Email alert

B. Profile

C. Approval process

D. Permission set

10) The OWD of booking object is private. After booking a travel package by a customer, the

company assigns one tour guide to every booking. How admin make sure that a booking record

should be accessible to appropriate guide?

A. Grant read permission on booking object to profile of a guide

B. create permission set with read permission on booking object and assign this

permissions set to a guide

C. grant read, create permission on booking object of a profile of a guide

D. create sharing rule on booking object for booking….

SCENARIO EXAM

SCENARIO-2 [ Doctor appointment booking]

Before moving on to next section to view the MCQ questions, please record your declaration (Yes or No)

in the text box that you have completely read the scenario.

Cloud 99 is the one of the famous hospital chains. The management of the cloud 99 asked Accenture to

develop an application to ease the process of taking an appointment for a doctor. The users of this app

are receptionist at hospital. An appointment can be taken over phone or face to face.

Functional requirements of the application.

1. Create a data model using following objects and field details

A. DoctorB. Patient-

 First-Name, Last-Name, Degree, Specialty, Email

 First-Name, Last-Name, Address, Phone, Age, Email

C. Appointment

 Doctor, Patient, Date-of-Appointment, Time-of-Appointment.

D. Case paper-

 Appointment, DoctorName(FirstName +LastName), PatientName(FirstName

+LastName), Patient-Age, Charges.

2. Create formula fields for DoctorName and PatientName.

3. Create appropriate relationship between objects

4. Doctor object should contain field to display total number of appointments of a doctor by

creating appropriate field.

5. Create a profile RECEPTIONIST. A user in this profile should be able Read, Create, Edit and Delete

records of Patient and Appointment. Another object records a user should only be Read.

6. Design a process to create a Case paper automatically when an Appointment is taken

7. Create a workflow Rule to send an email to Patient and Doctor.

8. Create a VF page to display Doctor detailed and all his/her appointments (Hint: Pass an ID of any

Doctor record to VF page)

9. Create Reports and Dashboard for the following cases:

a) Number of appoints per doctor.

b) Number of patients per doctor.

SCENARIO EXAM

Questions:

1. Identify the correct SOQL from the following to get all the appointments of all Doctors? (need to

be corrected)

A. SELECT Name, (SELECT Name, Appointments_c from AppointmentsDoctors_c

B. SELECT Name, (SELECT Name, Appointments_c from App

C. SELECT Name, (SELECT Name, Appointments_c from Appointments_c

D. SELECT Name, (SELECT Name, Appointments_c from Appointments_c

2. While configuring a process using process builder tool, select the valid options for executing

actions when adding criteria?

A. Conditions are met

B. Formula evaluates to true

C. No criteria- just execute true actions

D. Execute all actions

3. The DoctorName formulae field created in the case paper object is what type of formulae?

A. Cross-object

B. Simple

C. Mixed

D. Inherited

4. Once the appointment is taken by a patient, a notification should be sent to the Doctor and

Patient by an email. An administrator should select which action in workflow to implement this

functionally?

A. Task

B. Field update

C. Email alert

D. Outbound message

5. As an admin which type of report you will create to display number of appointments for every

doctor?

A. Join

B. Summary

C. Tabular

D. Join table

SCENARIO EXAM

6. As an admin what type of field you will create in Doctor object to show all total number of

Appointments of every doctor?

A. Formula

B. Roll up summary

C. Picklist

D. Picklist (multiselect)

7. A user in the RECEPTIONIST should be able to only read the records of the doctor object. What

should be be the value of organization wide default for doctor object?

A. Transfer

B. Private

C. Public read only

D. Public write only.

8. To create a case paper record automatically when an appointment is taken, which action as

admin you will select in process builder?

A. Post to chatter

B. Update records

C. Processes

D. Create a record.

9. By using which type of controller for VF page the functionality to display Doctor details and all

the appointments could by implemented [select 3]?

A. List controller

B. Extension controller

C. Standard controller

D. Custom controller

10. As a developer you wrote following apex xode

Public class HospitalController{

Public static List<Doctor c> getDoctorDetails (String docId){

Return (SELECT Id, Name, Specialty c, Email c

FROM Doctor c

WHERE Id=docID;

)

)

But this class show error. Debug the code and suggest the solution

A. Change the parameter as Id docId

B. Remove the static keyword from the method

C. Change the return type of the method as List<Case c

SCENARIO EXAM

D. Change the condition as

WHERE iD= docId

 Birth Registration System 

1. To redirect user to Error view(Error.cshtml) on any exception during on any exception 

during the login process , which of the below attribute should be added to the Login 

action method? 

 [HandleError(View=”Error”)] 

[Error] 

[Error(View=”Error”)] 

[Redirect(View=”Error”)] 

2. Developer wants to update the birth information , identity the correct POST 

implementation signature . Assume the BirthModel is a model class created to map with 

the Birth entity class. 

Public ActionResult UpdateInfo() 

Public ActionResult UpdateInfo(Models.BirthModel mod) 

Public ActionResult UpdateInfo(int bid) 

Public JsonResult UpdateInfo(Models.BirthModel mod) 

3. Identify the correct code to be written in the Repository class for retrieving all the Birth 

details from the BirthInfo table. 

Assumption :- BirthControlSystemDBEntities is DBcontext class , BirthInfo is an entity 

class and BirthInfoes is DBSet type. 

 Using (BirthControlSystemDBEntities db=new BirthControlSystemDBEntities()) 

 List< BirthInfo> result=new List< BirthInfo>(); 

 result=(from I in db.BirthInfoes select i).ToList< BirthInfo >(); 

 return result; 

} Not sure 

 BirthControlSystemDBEntities db=new BirthControlSystemDBEntities() 

 List< BirthInfo> result=new List< BirthInfo>(); 

 result=(from I in db.BirthInfoes select i); 

 return result; 

}; 

Using (BirthControlSystemDBEntities db=new BirthControlSystemDBEntities()) 

 BirthInfo result=new BirthInfo(); 

 result=(from I in db.BirthInfoes select i).ToList< BirthInfo >(); 

 return result; 

4. The User needs to add the birth details to DB, Identity the correct repository class code 

that fulfils the requirement. 

Assumption :- BirthControlSystemDBEntities is DBcontext class , BirthInfo is an entity 

class and BirthInfoes is DBSet type. 

public void AddEntry(BirthInfo obj) 

 Using (BirthControlSystemDBEntities db=new BirthControlSystemDBEntities()) 

 { 

 db.BirthInfoes.Add(obj); 

 } 

public void AddEntry(BirthInfo obj) 

 Using (BirthControlSystemDBEntities db=new BirthControlSystemDBEntities()) 

 { 

 db.BirthInfoes.Add(obj); 

 Obj.SaveChanges(); 

 } 

public void AddEntry(BirthInfo obj) 

 Using (BirthControlSystemDBEntities db=new BirthControlSystemDBEntities()) 

 { 

 db.BirthInfoes.Add(obj); 

 db.SaveChanges(); 

 } Not sure 

5. Developers wants to set the below page to be executed as the default page. Identify the 

correct code from the following. 

Routes.MapRoute{ 

Name:”Default”, 

url:”{controller}/{action}/{id}”, 

defaults:new {controller=”Home”, action=”Index”, id=UrlParameter.Optional} 

Routes.MapRoute{ 

Name:”Default”, 

url:”{controller}/{action}/{id}”, 

defaults:new {controller=”Home”, action=”Create”, id=UrlParameter.Optional} 

Routes.MapRoute{ 

Name:”Default”, 

url:”{controller}/{action}/{id}”, 

defaults:new {controller=”Create”, action=”Home”, id=UrlParameter.Optional} 

Routes.MapRoute{ 

Name:”Default”, 

url:”{controller}/{action}/{id}”, 

defaults:new {controller=”Home”, action=”Index1”, id=UrlParameter.Optional} 

6. Select the correct command for creating BirthInfo table? 

Note: Refer the birthInfo table structure given above in the scenario 

See pic option 1 // most probably not sure 

7. The MVC app requires a common look and feel so that all the view pages have the same 

header logo, footer image , background and font. A file named “Master.cshtml” contains 

the header , footer and CSS references. How will this file be used by all other views as 

their template? 

1. In the _Layout.cshtml file, set the Layout property to the path of the Master.cshtml file. 

2. In the _ViewStart.cshtml file, set the Layout property to the path of the Master.cshtml 

file. 

3. In the View_Start .cshtml file, set the TemplateFile property to the path of the 

Master.cshtml file. 

4. In the _Layout.cshtml file, set the ViewStart property to the path of the Master.cshtml 

file. //not sure 

8. Identify which scaffolding template will be used to create the view to display all the Birth 

information as given below? 

View 

Details 

List 

Edit 

9. Which of the following options will allow the controller to redirect a user to the 

ShowAllData view, after the user has successfully created a birth record? 

return RedirectAction(“showalldata”) 

return RedirectToAction(“showalldata”) 

return Response.Redirect(“showalldata”) 

return Action(“showalldata”) 

10. When the user successfully updates a birth information , the message ‘details updated 

successfully ’ must be shown as per the image. Identify which code can be used in the 

controller to achieve the requirement? 

Choose 2 most appropriate options. 

ViewBag[“msg”]= ”Details Updated Successfully”; 

ViewData.msg= ”Details Updated Successfully”; 

ViewData[msg]= ”Details Updated Successfully”; 

ViewBag.msg= ”Details Updated Successfully”; 

ViewData[“msg”]= ”Details Updated Successfully”; 

 

 

No comments:

Post a Comment