Computer Science  >  Research Paper  >  CSC 236 - Lab 2 (2 programs) ADTs implement vs extend (All)

CSC 236 - Lab 2 (2 programs) ADTs implement vs extend

Document Content and Description Below

CSC 236 - Lab 2 (2 programs) ADTs implement vs extend Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob with the n ... umbers 0 through 39 marked on the edge, and it has a three-number combination, which we will call x, y, and z. In order to open the lock, you must turn the knob clockwise at least one entire revolution, stopping with x at the top; then you turn the knob counterclockwise, stopping the “second” time that y appears at the top; finally, you turn the knob clockwise again, stopping the next time that z appears at the top. At this point, you may open the lock. Your “Lock” class should have a constructor that initializes the 3-number combination (use 0, 0, 0 for default arguments in the default constructor). - this means need to create two contructors one with 3 arguments and other with no arguments . Second one calls the first with (0,0,0). Somehting like this LockDataStructureClass () { LockDataStructureClass (0,0,0); } LockDataStructureClass( int x, int y, int z) { X = x; Y = y; Z = z; } Also, provide the following methods: To alter the lock’s combination to a new 3-number combination this mean, create method which takes 3 arguments to set X, Y, Z something like this private void alter (int x, int y, int z) { X = x; Y = y; Z = z; ) [Show More]

Last updated: 3 years ago

Preview 1 out of 6 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of CSC 236 - Lab 2 (2 programs) ADTs implement vs extend document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$11.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

74
0

Document information


Connected school, study & course


About the document


Uploaded On

Jun 11, 2021

Number of pages

6

Written in

All

Seller


Profile illustration for Cheryshev
Cheryshev

Member since 4 years

102 Documents Sold

Reviews Received
6
4
1
0
1
Additional information

This document has been written for:

Uploaded

Jun 11, 2021

Downloads

 0

Views

 74

Document Keyword Tags

Recommended For You

Get more on Research Paper »

$11.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·