structure Address following data members:
char* address
char* city
char* state
int zip_code
structure CustomerAccount following data members:
char* name
Address address
long long phoneNum
float balance
char* accountNum
following passed as arguments to global functions below
1. CustomerAccount *customers[100]
2. int accountsOpen
functions in global scope:
1. void OpenCustomerAccount (CustomerAccount* customers[], int& accountsOpen,
char* NameVal, char*addVal, char*cityVal, char*stateVal, int zipcodeVal, long long
phoneVal, float balanceVal) – a function to create a new customer account and assign it
an account number that has not already been taken between PK001 and PK100.
To dynamically create a new customer account, use an element in the customers array (a
pointer) with the new keyword.
2. int SearchCustomer (CustomerAccount* customers[], int accountsOpen, char*
accountNum) – If the
customer is found it returns the array index otherwise return -1
Briefly explain and differentiate the following development methods: Joint application
development and Rapid application development.
Pattern Printing
Given the number of rows N, write a program to print the hallow diamond pattern similar to the pattern shown below.
A
B B
C C
D D
E E
D D
C C
B B
AInput
The input will be a single line containing a positive integer (N).
Output
The output should be (2*N - 1) rows and (2*N - 1) columns containing the alphabet characters in the hollow diamond pattern.
Explanation
For example, if the given number is 5, the pattern should contain 9 rows and 9 columns as shown below.
A
B B
C C
D D
E E
D D
C C
B B
ANOTE:
NO SPACES ON LEFT SIDE FOR DIAMOND
Create the pseudocode that will display employee net pay. All employees have a standard R45 deduction from their checks.
If an employee does not earn enough to cover the deduction, an error message must display.
CCBPLogin
The goal of this coding exam is to quickly get you off the ground with CCBP Login Page
image:
https://assets.ccbp.in/frontend/content/dynamic-webapps/ccbp-login-op.gif
It should pass:
When the HTML button element with attribute type submit is clicked,if the values of the HTML input elements with ids name and password are not empty then text content in the HTML paragraph element with id resultMsg should be displayed as "Login Success".
When the HTML btn element with attribute type submit is clicked,if the values of the HTML input elements with ids name and password are empty then text content in the HTML paragraph element with id resultMsg should be displayed as "Fill in the required details".
When the submit is clicked and the value of the HTML input elements with id name is empty and password is not empty then the text content in the HTML paragraph element with id nameErrMsg and resultMsg should have an error message and "Fill in the required details" respectively.
1.Make a Console App with a class that encapsulates the following information about a bird: English name, Latin name, and Date last seen. Allows the user to fill in the details about a bird. The data is saved in a Bird object, which is then displayed to the user. 2.In the program, create a superclass called Animal and update class Bird to inherit from it. Create a new class named Butterfly that allows the user to collect butterfly data. 3.Display the percentage of birds and butterflies in the app when displaying the birds and butterflies. When there are no entries in the app yet, use exception handling to handle the divide by zero. 4.Create an interface called ISighting with a single method called displaySighting. Implement the interface in Animal but leave the displaySighting method abstract. Implement the displaySighting method in both the Bird & Butterfly classes to display all the information known about the animal to the console.Update app so that the user can choose to add a bird or a butterfly.
Riya took part in a maths quiz competition. To win the prize money she has to solve a tricky question at the end.For a given list of integers, write a program where all the integers in a given index range to be added.
She will be given M multiple ranges, where she should print the sum of numbers for each corresponding range.
Note: The limits in the range are both inclusive.
Input
The first line f input is space-separated integers.
The second line of input is a positive integer M denoting the number of index ranges.
The next M lines contain two space-separated integers of the range.
Output
The output should be M lines.
Each line contains an integer that represents the sum for the corresponding ranges.
Sample Input1
1 3 4 5 6
5
3 5
Sample Output1
12
[Please test the sample test cases and send the screenshots].
Random Activity
The goal of this coding exam is to quickly get you off the ground with the DOM Manipulations.
Refer to the below image.
https://assets.ccbp.in/frontend/content/dynamic-webapps/random-activity-output.gif
Achieve the given functionality using JS.
Make a HTTP request(GET method) using fetch with the URL
https://apis.ccbp.in/random-activity to get a random activity.
Add
loading status with Bootstrap component spinner while making an HTTP request
It should pass:
JS code implementation should use the .classList.add and .classList.remove.
JS code implementation should use the addEventListener for click event.
When the HTML button element with the id getActivityBtn is clicked, a GET request has to be sent to the given URL. and set HTTP response value in the HTML paragraph element with id activityName, activityType and HTML Img element with id activityImg should change according to the response.
The program simply calculates the pay(hourlyrate*normal hours)
Output displayed
Enter hourly rate : 21,50
Enter normal hours worked : 2
Hourly rate : R21,50. Normal hours :2
PAY : R43,00
Consider a language defined over ∑={a,b} that accepts the strings starting with b.
a. Give its transition diagram using JFlap.
b. Write a C/C++ program that stays in an infinite loop, prompts the user for a string,
terminates if the string is QUIT, and otherwise implements the DFA using the schemet hat allows state to state function-call and recursion.
c. Give the source code and the runtime screen while testing the strings aabab, bbbaba,
bba and abbb.