e, whats wrong with this. its always Battleship #include int main() { char id; printf("Enter the class ID : "); scanf("%c",&id); if(id='B') printf("The ship class is Battleship");
Q: a network OSI layer that is responsible for .authentication and authorization application layer…
A: Let us see the answer below,
Q: What impact has the use of ICT had on our society today?
A: Introduction: The broad use of information and communication technologies has had a profound impact…
Q: What are the benefits associated with using pure functions?
A: Introduction: Pure works are advantageous since they have no side effects. When you desire a clean…
Q: using emo8086, display a set of "*"or * base on the user's integers input (0-9) example: enter…
A: Algorithm: Input any number between 0-9 Iterate a loop from 0 to inputted number do Print "*"…
Q: DNS, including iterated and non-iterated queries, authoritative and root servers, and DNS entries
A: Completely describe the DNS, including iterated and non-iterated queries, authoritative and root…
Q: Exactly what does it mean to engage in "critical thinking"? Developing software follows this rule.
A: Answer:
Q: What stages are involved in modelling completely distributed systems?
A: Introduction:Here we need to give the steps involve in the fully distributed system modeling.
Q: Consider the topic of infrastructure sharing in mobile telecommunications networks briefly.
A: Answer: Infrastructure Sharing Among Mobile Telecommunication Networks: Mobile telephony has been…
Q: Could you kindly describe what occurred during the data breach that was recently made public using…
A: Given: A data violation is a cyberattack that improperly accesses and reveals sensitive data. Any…
Q: The following five criteria need to be satisfied before an ATM that recognises fingerprints may be…
A: Explanation: 1).Fingerprint authentication can be divided into two sub-domains: fingerprint…
Q: What is the correct command to find square root of any number, x. sqrt(x) O What is the output of…
A: Answer:
Q: In artificial intelligence, what is rationality and logical reasoning?
A: There are two terms given related to artificial intelligence: Rationality Logical reasoning
Q: What type of implications may a data breach have for the safety of information stored in the cloud?…
A: The above question is answered in step 2 :-
Q: What motivates us to learn programming languages?Give a reason for your decision
A: In the world of science and technology we are introduced by many technology as times is growing…
Q: The term "privacy" doesn't have a clear definition. The best five things you can do to keep your…
A: privacy, is the aspect of information technology (IT) that deals with the ability an organization or…
Q: When comparing wireless and wired networks, wireless networks have a lesser throughput.
A: Introduction: When properly configured, wired networks offer more longevity and stability than…
Q: Q3/ Read the following code carefully, and then program the same idea using the if-else-if ladder:…
A: The same idea as the code mentioned in the question but here using if-else-if ladder .
Q: 7. The following demonstrate show data can be stored in the data segment and the program rewritten…
A: The following address show the data can be stored in data segment and the program rewritten so…
Q: The term "privacy" doesn't have a clear definition. The best five things you can do to keep your…
A: Given: Dear student we need to explain about Privacy , The best five things we can do to keep your…
Q: In what circumstances may a user's effort to add data to the database result in a record that…
A: Introduction: The purpose of the query is to determine the circumstances under which an authorised…
Q: 3.5.1: Recursive function: Writing the base case. Add an if branch to complete double_pennies()'s…
A:
Q: Someone who examines and evaluates software on computers is known as a software tester. You are…
A: Overview: As a software tester, you're a valuable addition to any organization that employs you. You…
Q: The incoming and outgoing traffic, the database, the rules, and the authentication of domain logins…
A: Deification: One of your computers functions as a domain controller if you utilise Windows Server…
Q: 10110 о о 1011 13 о 11 оо ооооо ооо ооо о о о 12 о ооо о ceil(12.5) Fix(12.5) length('oil and gas')…
A: ceil(N) is a pre-defined MATLAB function that rounds each element of N to the nearest integer…
Q: Firewalls play an important role in network security and protection. Do you remember to explain the…
A: It is critical to comprehend the role of firewalls in network security and protection.Remember to…
Q: Firewalls play an important role in network security and protection. Do you remember to explain the…
A: Given: The importance of firewalls in network security and protection should be described. Remember…
Q: What are the distinctions between top-down and bottom-up information security approaches? Bottom-up…
A: Solution: The difference between the two methods provided for data security: In the top-down method,…
Q: 1. Please provide a brief response. Why do you want to join a software company Support Team?
A: Answer: A customer support job is a phenomenal profession decision for you in the event that you…
Q: What is type casting? Explain implicit and explicit type conversion with example.
A: Typecasting is converting one data type into another one. There are two types of type casting/ type…
Q: What kind of effects did the data breach at Capital One have on the general population? If things…
A: Explanation: Customers' trust in Capital One's financial goods and services was shaken as a result…
Q: What are your options for keeping your social media accounts private?
A: What is the social media platform? Social media is a computer-based technology. In this technology,…
Q: - Computer science : How does the system detect thrashing? Once it detects thrashing, what can…
A:
Q: sures have been taken by the database administrator of a firm to prevent the theft of personal…
A: Introduction: Below describe the database administrator of a firm to prevent the theft of personal…
Q: python: Which one of the following options best describes a good reason to define functions when…
A: 1) A function is simply a chunk of code that you can use over and over again, rather than writing it…
Q: The following matrix illustrates the estimated times (days) of an assignment problem. By using…
A: In polynomial time, a combinatorial optimization technique used to solve the assignment problem is…
Q: In the operations portion of the business plan that you are currently drafting for your firm, how…
A: Answer: The following are five methodologies to assist managers with actually settling clashes with…
Q: Sam has been through his scoring card in previous World Cup games. He has played a total of N games…
A: Input - Output details: First line contains an integer N, denoting the number of world cup matches.…
Q: What kind of effects did the data breach at Capital One have on the general population? If things…
A: Explanation: Customers' trust in Capital One's financial products and services was harmed as a…
Q: 13. if AX= 84; what is the result of executing the instruction CWD AX
A: This instruction (Convert signed Word to signed Doubleword) copies the sign bit of a word in AX to…
Q: 3. Make a program to accept a reading in richter scale of an earthquake and display the extent of…
A: Given :
Q: Could you kindly describe what occurred during the data breach that was recently made public using…
A: Introduction Data breach: A data breach occurs when a hacker gains unauthorized access to and…
Q: To what degree is it feasible to define a digital signature, and if this is the case, how does the…
A: What is a Digital Signature? Message and message digest:A document is called a message.Fingerprints…
Q: To write a main code that calls a function the main code and the function should be:
A: Answer for both mcqs given below with explanation
Q: Please, those of you who are experts, find a solution to this issue as quickly and precisely as…
A: Given:- Please answer the following question accurately and fast, experts. Describe the Software…
Q: Investigate the ways in which gaining data via observation and through the inspection of documents…
A: Analysis of the Observations: One of the methods that is used the most often in the social sciences…
Q: A very successful cinema director named "Chef" decided to solve the problem. When a customer wants…
A: It is defined as a powerful general-purpose programming language. It can be used to develop…
Q: at does Regula expression accept by the following finite automaton?
A: Given:
Q: When calling a function that takes many arguments, it is necessary to determine whether or not the…
A: Introduction: A Python function is a Python representation of a program's method. Certain functions…
Q: What heuristics may you apply to improve the design of your system?
A:
Q: In the next paragraph, you will learn about manual software testing, as well as the advantages of…
A: Manual software testing: It is necessary to have a conversation regarding manual software testing…
Fix please, whats wrong with this. its always Battleship
#include <stdio.h>
int main()
{
char id;
printf("Enter the class ID : ");
scanf("%c",&id);
if(id='B')
printf("The ship class is Battleship");
else if(id='C')
printf("The ship class is Cruiser");
else if(id='D')
printf("The ship class is Destroyer");
else if(id='F')
printf("The ship class is Frigate");
else
printf("Invalid");
}
im not computer subject major
Step by step
Solved in 4 steps with 2 images
- H1. Q2 Create a class Account class with balance as a data member. Create two constructors (no argument, and two arguments) and methods to withdraw and deposit balance. Subject: OOP in JAVA Please give typed answerWrite a program which controls a metro train and that keeps track of stations and who gets on and off. write a short description of how the code is designed. Design and implement a class called train, which has at least the following: At least the following attributes (you can include others): metroID stationNum which keeps track of the station that the train is at. iii. direction which keeps track of the direction the train is travelling in. passTotal which keeps track of the number of passengers currently on the train. A default constructor which sets the metroID to a random number between 1 and 1000, the station number to 0, the direction (int), and the passTotal to 0 (train is empty). A constructor with one parameter; the parameter is the metro id. The constructor assigns the passed integer to the metroID attribute; the rest of the attributes are set as described in the default constructor. Accessor methods for each attributes. Mutator methods for each attributes.…Python Programming 3. Write an Employee class that keeps data attributes for the following pieces of information:(a). Employee name(b). Employee numberNext, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:(c). Shift number (an integer,such as1 for morning shift, 2 for evening shift)(d). Hourly payrateWrite the appropriate accessor and mutator methods for each class.
- Design a Class Customerinsurance that implements Customer and Insurance interfaces, The Customer Class has the customers' details and abstract functions getoustomer().setCustomer(). The Insurance interface has the details of policy name, yearly premium amount and abstract functions get getpolicy(), Setpolicy() The Customer insurance class get the policy name payment type (quartery, hall yearly, yearly) of the customer and calculate the policy amount to be paid Write only in JavaCreate a program that will implement the following decision table, that classifies a ship depending on its class ID Class ID Ship Class B or b Battleship C or c Cruiser D or d Destroyer F or f FrigateCreate a class student and then create an object of this class and work with it. Idfirst namelast namegradesdate of birthfield of studyenrolled coursesenrolled semester using constructors, setters-getters in JAVA programmingID must be generated
- 2.Write a java program that define a class named smartPhone . It is implemented from interfaces mobile and tablet. Moblie contain methods canCall() and simType(). Tablet contain noOfApps(). Test this class in main.Write a code for a banking program.a) In this question, first, you need to create a Customer class, this class should have:• 2 private attributes: name (String) and balance (double)• Parametrized constructor to initialize the attributes• Methods:i. public String toString() that gives back the name and balanceii. public void addPercentage; this method will take a percentage value andadd it to the balanceb) Second, you will create a driver class and ask the user to enter 6 customers’ informationand then you will create an array of Customer objects.c) Then you use this array used for various operations as shown in the output.• Using the array of customer objects, you need to search for all customers whohave less than $150• Using the array of customer objects, you need to get the average balance of thebalances in this array• Using the array of customer objects, you need to get the customer with thehighest balance and lowest balance• Using the array of customer objects, you need to show all…Create the a Person class with the following:Class VariablesString firstnameString lastnameint birthmonthint birthdayint birthyearString ssnAll variables above should be private.ConstructorThe main constructor should take in all values and assign them to their respective private class variablesMethodsCreate a public getters and setters for firstname and lastname and SSNgetFirstnamegetLastnamesetFirstnamesetLastnameCreate a public getter method called getBirthdate, which will return a String composed of their birthday in month/day/year format. For example, if birthmonth=3, birthday=22, birthyear=2000, it should return the String "3/22/2000"Create a public method called verifySSN that takes in a String parameter and returns a boolean. It will check the parameter against the person's SSN and return true or false based on whether they match.
- using c++: Write a class service (servant_name, tip, and the static total_tip and staticnumber_of_servatns )When you create any object of the class the number of servants is added by 1When you set a tip for any servant it must be added to the total_tipPrint the total tips and find the everyone's income from the tipsAdd the following new constructor in the BMI class:/** Construct a BMI with the specified name, age, weight,* feet, and inches*/public BMI(String name, int age, double weight, double feet,double inches)Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 500 entries. Define a class addressType that can store a street address, city, state, and ZIP code. Use the appropriate functions to print and store the address. Also, use constructors to automatically initialize the member variables. Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in this chapters Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables. Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process a maximum of 500 entries. The program should perform the following operations: Load the data into the address book from a disk. Sort the address book by last name. Search for a person by last name. Print the address, phone number, and date of birth (if it exists) of a given person. Print the names of the people whose birthdays are in a given month. Print the names of all the people between two last names. Depending on the users request, print the names of all family members, friends, or business associates.