Consoaring Mobile | Interview Experience | Andorid
Summary
I recently interviewed with Consoaring Mobile for an Android Developer role, where I encountered three distinct coding challenges related to data structures, string validation, and error handling.
Full Experience
I recently interviewed with Consoaring Mobile for an Android Developer position. The interview consisted of three practical coding questions, each with a time limit of 10 minutes. I was tasked with demonstrating my proficiency in basic data structures, validating an IPv4 address, and implementing error handling within a class structure. I successfully provided solutions for all the problems during the interview.
Interview Questions (3)
a) Declare an array. Append an integer, a double and a string into it.
b) Print the Array
Functions: Create a function that will test to see whether a string value contains a valid IPv4 address. An IPv4 address is the address assigned to a computer that uses the internet Protocol (IP) to communicate. An IP address consists of four numeric values that range from 0-255, separated by a dot(period) Example: 10.0.1.250.
Error Handling : Create a class called VendingMachine. It must contain an array of strings called ‘items’ as a stored property e.g - var items: [String] = ["Akshay", "Rahul", "Mayank"]
Declare array and fill data
It must also contain a function ‘getItem’ which takes a string and compares it to the items in the ‘items’ array. If the item is present, it should print ‘Here you go!’ or else it should throw a custom error ‘ItemNotAvailable’.
// Step 2: call let objVendingMachine: VendingMachine = VendingMachine()
// objVendingMachine.getItem(value "Rahul")
// Result should be “Here you go!”