
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Can you please fix the code ? see picture for error thank you

Transcribed Image Text:Result
CPU Time: 0.02 sec(s), Memory: 16348 kilobyte(s)
Compilation succeeded - 1 warning(s)
True
jdoodle.cs(33,24): warning CS0414: The private field `UserNamespace. Administrator.admin_name' is assigned but its value is never used

Transcribed Image Text:1 using System;
2 using UserNamespace;
// namespace
3
4
5 namespace UserNamespace
6 {
7
8
Nm tin c
LO CO
9 ▾
10
11
12
13
14
15
16
17
18
19
20
21 -
22
23
24
25
26
27
28
29
30
31 ▾
32
33
34
35
36 -
37
38
39
40
41-
42
43
44
45
46 -
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// User class definition
public abstract class User
{
// instance variables
private string user_id; // user id
protected string user_password; // user password
// parametrized constructor
public User(string id, string pass)
{
user_id = id;
user_password = pass;
}
// verifyLogin method to verify the login cresentials
public bool verifyLogin(string id, string pass)
{
// return true, if matches
// otherwise, return false
return user_id.Equals(id)&&user_password. Equals(pass);
// abstract method
public abstract void updatePassword (string newPassword);
}
// Administrator clas definition
public class Administrator: User
// instance variable
private string admin_name; // name of admin
// parametrized constructor
public Administrator (string name, string id, string pass):base(id, pass)
{
admin_name = name;
}
// updatePassword method to update the password of user
public override void updatePassword(string newPassword)
{
user_password = newPassword;
}
// updateAdminName method to update the name of the admin
public void updateAdminName(string name)
admin_name name;
}
}
// Testing class definition
public class Testing
// main method
public static void Main()
// create an object of Administrator class
Administrator a = new Administrator ("Katty","kat123","katty123!");
// print the result
Console.WriteLine(a.verifyLogin("kat123","katty123!"));
}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Description i What is timestamp? Note that we have only timestamps, which ALWAYS contain yyyy-mm-dd as a date, hh:mm:ss as a time, and +/-zzzz as a timezone. time 2017-10-14 00:11:20 +0000 date time zone 12345 + timeconverter.py 1 def convert_time(timestamp): #NOTE: COMPLETE THE CODE FROM HERE! 6 #DO NOT MODIFY THE CONTENT HERE: 7 def print_result(hour, minute): 8 9 print("The time is {}:{}".format(hour, minute)) 10 #DO NOT MODIFY THE CONTENT HERE: 11 timestamp_list = ['2017-10-14 00:11:20 +0000', 12 '2022-03-24 07:22:16 -0400' Topic: Timestamp Converter Write a program timeconverter.py that has two functions: 1) The function convert_time : for extracting the hour and minute from a timestamp and 2) The function print_result: for printing the results. Note that the two functions should be called under the loop. 1) The function convert_time should: 1. take the timestamp from the function call, 2. separate time from date and time zone, 3. split it into hour, minute and seconds, 4. extract…arrow_forwardWhat are the essential elements for creating a loop? Determine two circumstances that may necessitate two distinct loop types. Make careful you include explicit information for each situation that show why the various loop types are essential.arrow_forwardYou have an equation r = 3*x^2 - 7*x+ 14. Write the MATLAB code to create a symbolic plot of x on the horizontal and r on the vertical axis from x = -10 to x = +10. (provide the code that can create the plot. Do not need to attach the plot below) %3Darrow_forward
- How long does the mouse pointer remain on a jagged line while editing code?arrow_forwardAlert: Don''t submit AI generated answer and give proper step by step answer with an explanation. Question 11 Python allows the programmer to work with text and number files. True Falsearrow_forwardQuestion pa This module will guide you through solving 92-36 by removal. Remove an(d)/(o)r add back values until you've removed 36 . You can only work with ones or tens. Use the table to track where you land and how much you've removed in total. 92-36arrow_forward
- Where is the solution? You just copy paste my question. Would you please check the solution?arrow_forwardform> <label for="username">Username <i>(letters and numbers only, no punctuation or special characters)</i></label><br> <input name="username" id="username" pattern="[A-Za-z0-9]+"> </form> What do the square brackets and plus sign (+) mean?arrow_forwardWhile writing code, why should you include comments? Please provide me some specific scenarios in which I might use a remark.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education