Mobile
i want code in between write code here
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
class Mobile {
// Write your code here
}
function main() {
const brand = readLine();
const ram = readLine();
const battery = parseInt(readLine());
const song = readLine();
const isOnCall = JSON.parse(readLine());
const myMobile = // Write your code here
myMobile.fullcharge();
myMobile.playMusic();
myMobile.stopMusic();
myMobile.endCall();
myMobile.makeCall();
myMobile.endCall();
}
Explain the five components of a DBMS and why Dineo would need each of the (10) components for her website.
Dineo has given what she wants to display on the website a lot of thought. And she has come up with quite a comprehensive set of business rules.
Launch Data To Be Displayed
Draw an Entity Relationship Diagram (ERD) using Unified Modelling Language (UML) notation, representing these business rules. Your design should be at the logical level – include surrogate primary key and foreign key fields and remember to remove any many-to-many relationships.
After carefully studying the infographic, Dineo now needs to choose whether to use a relational database or a NoSQL database. She says that she needs to store the following information:
• She needs to know who built the vehicle, where it was launched from, and when for each launch. For crewed missions, she needs to know who the astronauts were on board.
• Each launch also has multimedia that should be included – a text description, photos, maybe even videos.
Explain to her which type of database (relational or NoSQL) you would recommend, and why, for each of the following types of data.
Q.2.1 Launch data.
Q.2.2 Multimedia related to the launch.
Make a file by yourself named ”Integer.txt” and add 5 integer values in it. Now, write a C++
program that reads data (5 integers) from the file and store them in integer array. Also make another
integer array (int result []) of same size to store the results. The program should check for each number
in array if it is prime number or not. If the number is prime, update value in result[] array from 0 to 1.
Lastly, write output in another file named “Result.txt”
Example
Input:
Integer.txt
2 11 1 17 8
Output:
Result.txt
1 1 0 1 0
Hint: Prime number are those which is only divisible by 1 or itself.
Task 2
Write a program which takes 3 students’ data from file (“input.txt”) and displays the grade
obtained by student in new file (“output.txt”).
Hint: The program will read name from the file and then the marks obtained in three subjects.
Add those marks and convert them out of 100 and display the grade obtained by student.
Repeat these steps for three students
Score (out of
100)
Grade
0 – 49.5
F
49.5 – 57.5
D
57.5 – 71.5
C
71.5 – 84.5
B
>= 84.5
A
Task 2
Write a program which takes 3 students’ data from file (“input.txt”) and displays the grade
obtained by student in new file (“output.txt”).
Hint: The program will read name from the file and then the marks obtained in three subjects.
Add those marks and convert them out of 100 and display the grade obtained by student.
Repeat these steps for three students
Score (out of
100)
Grade
0 – 49.5
F
49.5 – 57.5
D
57.5 – 71.5
C
71.5 – 84.5
B
>= 84.5
A
Write a script called Student.sh that will accept the following student details: studentID, StudentName, ContactNo and Email. The program should add records to a file called Student_Details.txt under each heading, at the end of each record the program should prompt you if you want to add more records and if yes it should allow you to continue adding the records.
Students as a group are associated with multiple faculty members, and faculty members in turn are associated with multiple-students. For this scenario, the cardinality between the student entity and the faculty entity is....?
one to many
Make a file by yourself named ”Integer.txt” and add 5 integer values in it. Now, write a C++
program that reads data (5 integers) from the file and store them in integer array. Also make another
integer array (int result []) of same size to store the results. The program should check for each number
in array if it is prime number or not. If the number is prime, update value in result[] array from 0 to 1.
Lastly, write output in another file named “Result.txt”